Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using TestConsole.Mathematic;
- using TestConsole.Tools;
- namespace TestConsole
- {
- public class Program
- {
- public static void Main(string[] args)
- {
- UserInput UserInput = new UserInput();
- double a = UserInput.GetDouble("Podaj a");
- double b = UserInput.GetDouble("Podaj b");
- double c = UserInput.GetDouble("Podaj c");
- var quadricFunctionCalculator = new QuadricFunctionCalculator();
- var results = quadricFunctionCalculator.GetResults(a,b,c);
- if (results.Count == 2)
- {
- Console.WriteLine($"Funkcja ma dwa pierwiastki: {results[0]} oraz {results[1]}");
- }
- else if (results.Count == 1)
- {
- Console.WriteLine($"Funkcja ma jeden pierwiastek: {results[0]}");
- }
- else
- {
- Console.WriteLine("Funkcja nie ma pierwiastków");
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement