Advertisement
IlianStefanov

Untitled

Mar 16th, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace N_Proizolni_chisla
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             Console.Write("Въведи броя на числата: ");
  13.             int n = int.Parse(Console.ReadLine());
  14.             Console.Write("Въведи първото число за интервала: ");
  15.             int a = int.Parse(Console.ReadLine());
  16.             Console.Write("Въведи второто число за интервала: ");
  17.             int b = int.Parse(Console.ReadLine());
  18.             for (i=1;ii<=n;I++)
  19.  
  20.         {
  21.  
  22.        int currentNumber=Console.ReadLIne();
  23.        if(currentNumber>=a&&currentNumber<=b}
  24.  
  25.               {
  26.                  br++;
  27.               }
  28.  
  29.         }
  30.  
  31.         ConsoleWrite(br);
  32.        
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement