Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Mo3adalaTarbe3ia
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a;
- int b;
- int c;
- Console.WriteLine("enter a,b,c");
- a = int.Parse(Console.ReadLine());
- b = int.Parse(Console.ReadLine());
- c = int.Parse(Console.ReadLine());
- if (a == 0)
- {
- Console.WriteLine("Error, 'A' should not be zero");
- }
- else
- {
- int delta = b * b - 4 * a * c;
- if (delta == 0)
- {
- Console.WriteLine("Your numbers have 1 Solution ");
- }
- else
- {
- if (delta > 0)
- {
- Console.WriteLine("Your numbers have 2 Solutions ");
- }
- else
- {
- if (delta < 0)
- {
- Console.WriteLine("Your numbers have no Solutions ");
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement