Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static bool mehalkim(int num1, int num2)
- {
- bool good = false;
- for (int i = 1; i <= num1 || i <= num2; i++)
- {
- if ((num1 % i ==0) && (num2 % i == 0))
- good = true;
- }
- return good;
- }
- static void Main(string[] args)
- {
- int num1, num2, total;
- bool hiluk;
- for (int i = 1; i <= 20; i++)
- {
- num1 = int.parse(Console.Readline());
- num2 = int.parse(Console.Readline());
- hiluk = mehalkim(num1, num2);
- if (hiluk == false)
- total++;
- }
- Console.Writeline(total);
- }
- }
- }
Add Comment
Please, Sign In to add comment