//1
var x: real;
begin
write('x = ');
readln(x);
writeln(abs(10 - sqrt(1 + x * x)));
end.
//2
begin
randomize;
writeln(random(15) + 21);
end.
//3
var a, b: real;
begin
write(' Катет a = ');
readln(a);
write(' Катет b = ');
readln(b);
writeln(' Гипотенуза = ', sqrt(a * a + b * b));
end.
#include <iostream>
using namespace std;
int main()
{
int ar[20];
for(int i=0;i<20;i++) cin>>ar[i];
return 0;
}
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
using std::fixed;
#include <cstring>
using std::strcpy;
#include <iomanip>
using std::setprecision;
int main()
{
char s[100], temp[100];
int counter = 0, counter1 = 0;
cout << "Enter the string: ";
cin.getline(s, 100);
strcpy(temp, s);
//Определяем общее количество слов
//и количество слов с буквай d
char *ptr = strtok(temp, " ");
while(ptr)
{
for(int i = 0; *(ptr + i) != NULL; i++)
{
if(*(ptr + i) == 'd')
{
counter1++;
break;
}
}
counter++;
ptr = strtok(NULL, " ");
}
cout << setprecision(2) << fixed << (counter1 * 100 / double(counter)) << '%' << endl;
return 0;
}
Var s,h:integer;
begin
a:=5;
for x:=2 to 9 do writeln(x,'x',a,'=',x*a);
end.
Возможно, не уверен, цепь питания