Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int counter = 0;
- Console.WriteLine("Printing all the uneven numbers from 0 to 100:");
- for (int x = 0; x <= 100; x++)
- {
- if(x%2!=0)
- {
- counter++;
- Console.Write("Hi There!");
- }
- }
- Console.WriteLine("\nPrinted 'Hi There' to the Console {0} times", counter);
- Console.ReadKey();
Advertisement
Add Comment
Please, Sign In to add comment