Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Problem24
- {
- class Program
- {
- public static void Main(string[] args)
- {
- string liczby;
- while ((liczby = Console.ReadLine()) != null)
- {
- string[] tab = liczby.Split(' ');
- float a = float.Parse(tab[0]);
- float b = float.Parse(tab[1]);
- float c = float.Parse(tab[2]);
- float delta = b * b - 4 * a * c;
- if (delta > 0)
- {
- Console.WriteLine("2");
- }
- else if (delta == 0)
- {
- Console.WriteLine("1");
- }
- else
- {
- Console.WriteLine("0");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement