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;
- using System.Threading.Tasks;
- namespace Loops
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- //Console.WriteLine("Hello World!");
- //Console.WriteLine("Hello World!");
- //Console.WriteLine("Hello World!");
- //Console.WriteLine("Hello World!");
- //Console.WriteLine("Hello World!");
- //Console.WriteLine("Hello World!");
- //Console.WriteLine("Hello World!");
- //Console.WriteLine("Hello World!");
- //Console.WriteLine("Hello World!");
- //Console.WriteLine("Hello World!");
- /*
- int counter = 1;
- while (counter < 11)
- {
- Console.WriteLine($"{counter},");
- counter++;
- }
- do
- {
- if (counter != 10)
- Console.Write($"{counter++},");
- else
- Console.Write($"{counter++}");
- } while (counter < 11);
- */
- //for(int i = 10 ; i > 0 ; i--)
- // Console.WriteLine($"{i},");
- //Console.WriteLine();
- for (int i = 2; i < 11; i += 2)
- {
- Console.Write($"{i}, ");
- }
- Console.WriteLine();
- for (int i = 1; i < 11; i++)
- {
- if (i % 2 == 0)
- Console.Write($"{i}, ");
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement