#include <stdio.h>
#include <stdlib.h>
int main()
{
// y = 1 - x + x * x / 2 + 5x
// -5 < x < 6
// Считываем x:
float x;
printf("Enter x: ");
scanf("%f", &x);
// Проверяем условие с цикла while:
// PS: для извращенцев.
int i = 0;
while (i == 0)
{
if (-5 >= x)
{
return EXIT_FAILURE;
}
if (x >= 6)
{
return EXIT_FAILURE;
}
i = 1;
}
// Решаем уравнение:
float y = 1 - x + x * x / 2 + 5 * x;
// Выводим результат:
printf("Result y = %f\n", y);
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
// y = 1 - x + x * x / 2 + 5x
// -5 < x < 6
// Считываем x:
float x;
printf("Enter x: ");
scanf("%f", &x);
// Проверяем условие с цикла while:
// PS: для извращенцев.
int i = 0;
while (i == 0)
{
if (-5 >= x)
{
return EXIT_FAILURE;
}
if (x >= 6)
{
return EXIT_FAILURE;
}
i = 1;
}
// Решаем уравнение:
float y = 1 - x + x * x / 2 + 5 * x;
// Выводим результат:
printf("Result y = %f\n", y);
}
Program z19; Var a: array [1..1000] of string; i,j,l,min:integer; s:string;Begin write('Введите строку - '); readln(s); l:=s.Length; i:= 1; j:= 1; while i <= l do begin while (s[i] <> ' ') and (i <= l) do begin a[j]:=a[j] + s[i]; i:= i + 1; if (i > l) then break; end; j:= j + 1; i:= i + 1; end; i:= 1; while (a[i] <> '') do begin if ((a[i] = 'мое') or (a[i] = 'Мое')) then a[i]:= 'наше'; write(a[i], ' '); i:= i + 1; end;End.