Advertisement
aslen

Untitled

Mar 29th, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.09 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("Enter any number from 0 to 100");
  14.             int numb = int.Parse(Console.ReadLine());
  15.  
  16.             for (int i = numb; i < 101; i++)
  17.             {
  18.                 Console.Write(i + " ");
  19.             }
  20.             Console.WriteLine("\n");
  21.             if ((numb % 2) == 0)
  22.                 Console.WriteLine("Number {0} - even number", numb);
  23.             else
  24.                 Console.WriteLine("Number {0} - odd number", numb);
  25.             Console.WriteLine("\n");
  26.             if ((numb % 5) == 0)
  27.             {
  28.                 Console.Write("Number {0} division on 5 ", numb);
  29.                 if((numb%10)==0)
  30.                      Console.Write("and 10");
  31.             }
  32.             else
  33.                 Console.WriteLine("Number {0} - shares not on 5 and 10", numb);
  34.            
  35.             Console.ReadLine();
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement