Advertisement
VEGASo

(С#) Lab #3 Ex. 2

Oct 15th, 2022
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 KB | None | 0 0
  1. using System;
  2.  
  3. namespace LearnRSUE
  4. {
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             int one = 0, two = 0;
  10.  
  11.  
  12.             Console.Write("От какого числа(диапазон): ");
  13.             one = Convert.ToInt32(Console.ReadLine());
  14.  
  15.             Console.Write("До какого числа(диапазон): ");
  16.             two = Convert.ToInt32(Console.ReadLine());
  17.  
  18.  
  19.             for (int i = one; i <= two; i++)
  20.             {
  21.                 if (i % 10 == 5)
  22.                 {
  23.                     Console.WriteLine(i);
  24.                 }
  25.             }
  26.  
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement