Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace HelloApp
- {
- public class Program
- {
- public static void Main(string[] args)
- {
- double y, m;
- double x = 1;
- Console.WriteLine("Введите a1");
- double a1 = double.Parse(Console.ReadLine());
- Console.WriteLine("Введите b1");
- double b1 = double.Parse(Console.ReadLine());
- Console.WriteLine("Введите c1");
- double c1 = double.Parse(Console.ReadLine());
- Console.WriteLine("Введите a2");
- double a2 = double.Parse(Console.ReadLine());
- Console.WriteLine("Введите b2");
- double b2 = double.Parse(Console.ReadLine());
- Console.WriteLine("Введите c2");
- double c2 = double.Parse(Console.ReadLine());
- if ((a1 * b1) != (a2 * b2))
- {
- Console.WriteLine("Точек пересечения не существует");
- }
- else
- {
- y = (c1 - a1 * x) / b1;
- m = (a2 * x + b2 * ((c1 - a1 * x) / b1));
- Console.WriteLine(m);
- }
- Console.Read();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement