Facebook
From Manol, 3 Years ago, written in C#.
Embed
Download Paste or View Raw
Hits: 52
  1. using System;
  2.  
  3. namespace zad_2
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int count = 0;
  10.  
  11.             while (true)
  12.             {
  13.                 string input = Console.ReadLine();
  14.                 if (input == "end")
  15.                 {
  16.                     break;
  17.                 }
  18.                 int number = int.Parse(input);
  19.                 if (number % 2 != 0 && number % 7 == 0)
  20.                 {
  21.                     count++;
  22.                 }
  23.             }
  24.  
  25.  
  26.                 Console.WriteLine(count);
  27.                 Console.ReadKey();
  28.         }
  29.     }
  30. }
  31.