Program enot; Var a: array[1..33] of integer; i,k,s:integer; begin s:=0; k:=12; for i:= 1 to 33 do begin a[i]:= k+1; k:=k+1; end; for i:= 1 to 33 do if a[i] mod 2 <>0 then s:=s+1; write(s); end.
№1 #include <iostream> using namespace std; int main () { int a,b; cin >> a >> b; if (a<b) cout << a << endl; else if (a==b) cout << "a=b" << endl; else cout << b << endl; system ("PAUSE"); return 0; }
№2 #include <iostream> using namespace std; int main () { char ch1,ch2; int i1,i2; cin >> ch1 >> ch2; i1=ch1; i2=ch2; if (i1<=i2) cout << ch1 << ' ' << ch2 << endl; else cout << ch2 << ' ' << ch1 << endl; system ("PAUSE"); return 0; }
№3 #include <iostream> using namespace std; int main () { float p,q; cout << "p="; cin >> p; cout << "q="; cin >> q; cout << p-2*q << endl; system ("PAUSE"); return 0; }
Var a: array[1..33] of integer;
i,k,s:integer;
begin
s:=0;
k:=12;
for i:= 1 to 33 do
begin
a[i]:= k+1;
k:=k+1;
end;
for i:= 1 to 33 do
if a[i] mod 2 <>0 then s:=s+1;
write(s);
end.