HOC24
Lớp học
Môn học
Chủ đề / Chương
Bài học
uses crt;
var
s:string;
begin
write('nhap xau: '); readln(s);
writeln('do dai xau la: ',length(s));
readln;
end.
const fi='nhap.txt';
f:text;
b:byte;
a:longint;
clrscr;
assign(f,f1);
reset(f);
read(f,a,b);
close(f);
a:=exp(b*ln(a));
write('ket qua la: ',a);
const fi='tep1.txt';
fo='ketqua.txt';
f1,f2:text;
b,d,f:byte;
T,a,c,e:longint;
assign(f1,fi);
assign(f2,fo);
reset(f1);
rewrite(f2);
Readln(f1,a,b,c,d,e,f);
close(f1);
c:=exp(d*ln(c));
e:=exp(f*ln(e));
t:=a+c;
t:=t+e;
writeln(f2,t);
close(t2);
program ct;
s1,s2:string;
write('nhap ho dem: ');
readln(s1);
write('nhap ten: ');
readln(s2);
writeln('ten day du la: ',s1,' ',s2);
program so_le;uses crt;varn,i,d:integer;a:Array[1..32000] of integer;beginclrscr;
write('nhap n: ');
readln(n);
for i:= 1 to n do
write('nhap a[',i,']: ');
readln(a[i]);
end;
d:=0;
if a[i] mod 2 <> 0 then d:=d+1;write('so luong so nguyen la so le la: ',d);
const fi='test.inp'; fo='test.out';varf:text;n,i,j,t:longint;a:array[1..100] of longint;b:array[1..1000000000] of boolean;procedure ip; begin assign(f,fi); reset(f); readln(f,n); for i:= 1 to n do read(f,a[i]); close(f); end;procedure out; begin assign(f,fo); rewrite(f); for i:= 1 to n do begin b[a[i]]:=true; t:=a[i]; for j:= i+1 to n do begin b[a[j]] := true; b[a[i]+a[j]]:= true; t:=t+a[j]; b[t]:=true; end; end; t:=1; while b[t] = true do inc(t); write(f,t); close(f); end;BEGINip;out;END.
holy, rối cái đầu nuôn
program nhap_n;
i,n:integer;
t: longint;
a: array[1..100] of integer;
write('nhap N: ');
for i:=1 to n do
write('a[',i,']='); readln(a[i]);
if (a[i]>2) and (a[i] mod 2=0) then t:=t+a[i];
write(t);