Var n, i: Integer;
x, sum, temp, cosx: Double;
begin
ReadLn(x, n);
sum:=0;
cosx:=cos(x);
temp:=1;
for i:=1 to n do begin
temp:=temp*cosx;
sum:=sum+temp;
end;
WriteLn(sum);
end.
Так?
var c, b:integer; a, v:real;
begin
read(b,c);
a:=30*b/4+c ;
v:=b/a;
writeln(v);
end.
Var
a: integer;
begin
a := 0;
writeln('enter the value: ');
read(a);
if a < 0 then
write('negative')
else
write('positive');
if a mod 2 = 0 then
write(' even')
else
write(' odd');
end.
#include <iostream>
using namespace std;
int a, b;
void check(int a, int b);
int main()
{
cout<<"Enter 2 numbers\n";
cin>>a;
cin>>b;
check(a, b);
system("pause");
return 0;
}
void check(int a, int b)
{
if (a>b)
{
a=a*a*a;
b=b*b;
}
else
{
a=a*a;
b=b*b*b;
}
cout<<a<<"\n";
cout<<b<<"\n";
}
Var
n:integer;
begin
readln(n);
if n > 10 then writeln(n, ' > ', 10);
if n < 10 then writeln(n, ' < ', 10);
if n = 10 then writeln(n, ' = ', 10);
<span>end.</span>