Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace SAA
- {
- class Func1
- {
- static void Main(string[] args)
- {
- string input;
- double x,y;
- Console.Write("Введите число x: ");
- input = Console.ReadLine();
- input = input.Replace('.', ',');
- x = Double.Parse(input);
- if (x >= 0.9)
- {
- y = 1 / Math.Pow(0.1 + x, 2);
- }
- else if (x >= 0 && x < 0.9)
- {
- y = 0.2 * x + 0.1;
- }
- else if (x<0)
- {
- y = x * x + 0.2;
- }
- else
- {
- Console.WriteLine("ERROR");
- return;
- }
- Console.WriteLine("Ответ: " + y);
- Console.ReadLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment