Advertisement
SMASIF

C#- Task 1 Day 2

Mar 10th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.99 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 ConsoleApplication1
  8. {
  9.     class Program
  10.     {
  11.         private static void Main(string[] args)
  12.         {
  13.             int limit = Convert.ToInt32(Console.ReadLine());
  14.             for (int i = 1; i <= limit; i++)
  15.             {
  16.                 if (i % 3 == 0 && i % 5 == 0)
  17.                 {
  18.                     Console.Write("SEIPDotNet ");
  19.                     continue;
  20.                 }
  21.                 if (i % 3 == 0)
  22.                 {
  23.                     Console.Write("SEIP ");
  24.                     continue;
  25.                 }
  26.  
  27.                 if (i % 5 == 0)
  28.                 {
  29.                     Console.Write("DotNET ");
  30.                     continue;
  31.                 }
  32.  
  33.  
  34.                 else
  35.                 {
  36.                     Console.Write(" " + i + " ");
  37.                 }
  38.  
  39.  
  40.             }
  41.             Console.ReadKey();
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement