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 Exe
- {
- class Program
- {
- static void Main(string[] args)
- {
- long a, b, c;
- Console.WriteLine("Введите коефицент при X");
- while (!long.TryParse(Console.ReadLine(), out a)) ;
- Console.WriteLine("Введите свободный коефицент");
- while (!long.TryParse(Console.ReadLine(), out b)) ;
- Console.WriteLine("Введите основание(число у Z)");
- while (!long.TryParse(Console.ReadLine(), out c)) ;
- long x = 0;
- while ((a * x + b) % c != 0)
- x++;
- Console.WriteLine(x);
- Console.Read();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement