Program kv;Var a,b,c,x1,x2,x,D: Real; BEGIN write ('input a b c =>'); Readln (a,b,c); if a = 0 then if b = 0 then Begin Writeln ('The equation is not compatible'); Readln; Halt End else Begin x :=-c / b; Writeln ('Root x=' ,x:8:2); Readln; Halt End else Begin D :=Sqr (b) - 4 * a * c; if D<0 then Begin Writeln ('The equation has no real roots'); readln; Halt End else Begin x:=-b /( 2 * a ); if D = 0 then Begin Writeln ('Roots are equal x1=x2=', x:8:2); Readln; Halt End; x2:= Sqrt (D)/(2*a); x1:= x2 + x; x2:= x - x2; Writeln('Roots: x1=',x1:8:2, ' x2= ',x2:8:2) EndEnd; Readln;End.
End else Begin x :=-c / b; Writeln ('Root x=' ,x:8:2); Readln; Halt End else Begin D :=Sqr (b) - 4 * a * c; if D<0 then Begin Writeln ('The equation has no real roots');
readln; Halt End else Begin x:=-b /( 2 * a ); if D = 0 then Begin Writeln ('Roots are equal x1=x2=', x:8:2); Readln; Halt End; x2:= Sqrt (D)/(2*a); x1:= x2 + x; x2:= x - x2; Writeln('Roots: x1=',x1:8:2, ' x2= ',x2:8:2) EndEnd; Readln;End.
#include <string>
#include <ctype.h>
using namespace std;
int main() {
freopen("D:\\input.txt", "r", stdin);
freopen("D:\\output.txt", "w", stdout);
char s[10001];
string newtext = "";
int c = 0;
gets_s(s);
for (int i = 0; s[i] != '\0'; i++) {
if (s[i] == 'e' && s[i + 1] == 'n' && s[i + 2] == 'd') {
c += 3;
newtext += s[i];
newtext += " ";
newtext += s[i + 1];
newtext += " ";
newtext += s[i + 2];
break;
}
c++;
newtext += s[i];
newtext += " ";
}
cout << c << endl << newtext;
}