Использование циклов - C#
Формулировка задачи:
Добрый день, уважаемые форумчани!
помогите, пожалуйста с этой задачей, не могу ее осилить
Заранее, очень благодарна!
Решение задачи: «Использование циклов»
textual
Листинг программы
Console.WriteLine("Введите a);
int a = int.Parse(Console.ReadLine());
Console.WriteLine("Введите b);
int b = int.Parse(Console.ReadLine());
Console.WriteLine("Введите c);
int c = int.Parse(Console.ReadLine());
Console.WriteLine("Введите x_nach);
int x_nach = int.Parse(Console.ReadLine());
Console.WriteLine("Введите x_kon);
int x_kon= int.Parse(Console.ReadLine());
Console.WriteLine("Введите dx);
int dx= int.Parse(Console.ReadLine());
int f;
if (c<0 & x!=0)
{
f=-a*x-c;
}
else if (c>0 & x=0)
{
f = (x-a)/(-c);
}
else
{
f= b*x/(c-a);
}