Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FizzBuss
- {
- class Program
- {
- static void Main()
- {
- int i = 1;
- while ( i <= 100 )
- {
- if( i % 3 == 0 )
- {
- if( i % 5 == 0 )
- {
- Console.WriteLine("FIZZBUZZ!");
- } else
- {
- Console.WriteLine("FIZZ");
- }
- } else
- {
- if( i % 5 == 0)
- {
- Console.WriteLine("BUZZ");
- } else
- {
- Console.WriteLine(i);
- }
- }
- i++;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment