Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace FizzBizz
- {
- class Program
- {
- static void Main(string[] args)
- {
- for (int x = 1; x <= 100; x++)
- {
- if ((x % 3 != 0) && (x % 5 != 0))
- {
- Console.WriteLine(x);
- }
- if ((x%3 == 0)!=(x%5==0))
- {
- Console.WriteLine("fizz {0}", x);
- }
- if ((x%5 == 0)!=(x%3==0))
- {
- Console.WriteLine("bizz {0}", x);
- }
- if ((x%3==0) && (x%5==0))
- {
- Console.WriteLine("fizzbizz {0}", x);
- }
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement