Advertisement
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;
- using System.Threading.Tasks;
- namespace specialCombinations
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = int.Parse(Console.ReadLine());
- int b = int.Parse(Console.ReadLine());
- int c = int.Parse(Console.ReadLine());
- for (int s = 1; s <= a; s++)
- {
- for (int j = 2; j <= b; j++)
- {
- for (int i = 2; i <= c; i++)
- {
- bool isPrime = true;
- for (int q = 2; q <= Math.Sqrt(j); q++)
- {
- if (j%q==0)
- {
- isPrime = false;
- }
- }
- if (i%2==0 && s%2==0 && isPrime==true)
- {
- Console.WriteLine($"{s} {j} {i}");
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement