#include <iostream>
using namespace std;
int main() {
const char* s = "one two three four five six seven";
const char* w = 0;
int max_size = 0;
int word_size = 0;
for (int i = 0; s[i]; i++) {
if (s[i] != ' ') {
word_size++;;
} else if ((s[i] == ' ') || !s[i + 1]) {
if (word_size > max_size) {
max_size = word_size;
w = s + i - word_size;
}
word_size = 0;
}
}
for (int i = 0; i < max_size; i++) {
std::cout << w[i];
}
std::cout << "\n";
return 0;
}
205(8) = 133(10)
205(8) = 2∙8^2+0∙8^1+5∙8^0 = 128+0+5 = 133(10)
Var
x:real;
begin
Read(x);
if (x > 1) then Writeln('y = ', x*x*x - 2*x*x + x);
if (x < 1) then Writeln('y = ', 2*x - 5);
end.
Program gt;
label 1;
var a:array[1..30]of integer;
i,min:integer;
begin
randomize;
min:=200;
1:
for i:=1 to 30 do
begin
a[i]:=random(101);
if(a[i]<min)and(a[i]>=20)then min:=a[i];
end;
if(min<>200)then begin
for i:=1 to 30 do
write(a[i],' ');
writeln;
writeln(min);
exit;
end;
if(min=200)then goto 1;
end.
var n,i,max:integer;
a:array[1..10000] of integer;
begin
randomize;
writeln('Введите кол.натур. чисел: ');
read(n);
for i:=1 to n do begin
a[i]:= random(n*n);
write(a[i],' ');
//read(a[i]); //Если нужен ввод с клавиатуры
end;
writeln;
max:=a[1];
for i:=1 to n do begin
if a[i]>= max then
begin
max:=a[i];
end;
end;
writeln('Наибольшее число:', max);
end.