Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
FizzBuzz C#
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; namespace Rextester { public class Program { public static void Main(string[] args) { string s1 = "Fizz"; string s2 = "Buzz"; for (int i = 1; i <= 100; ++i) { // Multiple of 3 if ((i % 3) == 0) { Console.Write(s1); // Also multiple of 5 if ((i % 5) == 0) { Console.Write(s2); } } // Multiple of 5 else if ((i % 5) == 0) { Console.Write(s2); } else { Console.Write(i); } Console.Write("\n"); } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
adxcsxsd
pass-len-to-predicate-modified
TEst
Frase
Programmes
Problem: fb_series
ArrayList list merge_collections
yari
Explicit Interface Examplle
Use Lock Keyword
Please log in to post a comment.