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 java_8
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Shkruani nje numer: ");
- int numri = int.Parse(Console.ReadLine());
- string pergjigja;
- do
- {
- Console.WriteLine("Qift/Tek");
- pergjigja = Console.ReadLine();
- }
- while ( pergjigja != "Qift" && pergjigja != "Tek");
- for (int i = 1; i <= numri; i++)
- {
- if (pergjigja == "Qift")
- {
- if (i % 2 == 0)
- {
- Console.WriteLine(i);
- }
- }
- else if (pergjigja == "Tek")
- {
- if (i % 2 != 0)
- {
- Console.WriteLine(i);
- }
- }
- else
- {
- }
- }
- {
- Console.WriteLine(numri);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement