Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
uses crt;
var a,b:integer;
begin
clrscr;
readln(a,b);
writeln(a+b);
readln;
end.
uses crt;
var i,n,kt:integer;
begin
clrscr;
readln(n);
kt:=0;
for i=2 to trunc(sqrt(n)) do
if n mod i=0 then kt:=1;
if (kt=0) and (n>1) then write('phai')
else write('Khong phai');
readln;
end.
Var i,n,souoc:integer;
Begin
While n <= 1 do
Begin
Write('Nhap n = ');readln(n);
End;
For i:=1 to n do
If n mod i = 0 then souoc:=souoc+1;
If souoc = 2 then write(n,' la so nguyen to')
Else write(n,' khong la so nguyen to');
Readln;
End.
uses crt;
var a,b:int64;
begin
clrscr;
readln(a,b);
writeln(a+b);
readln;
end.
Câu 58:
Var n:integer;
Begin
Write('n = ');readln(n);
If n mod 2 <> 0 then write(n,' la so le')
Else write(n,' khong la so le');
Readln
End.
Câu 61:
Var n:integer;
Begin
Write('n = ');readln(n);
If n mod 2 = 0 then write(n,' la so chan')
Else write(n,' khong la so chan');
Readln
End.
1. uses crt;
var a,vt:array[1..100]of integer;
n,i,t,dem:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
repeat
write('A[',i,']='); readln(a[i]);
until a[i]>=0;
end;
t:=0;
for i:=1 to n do
begin
if t<100 then
begin
t:=t+a[i];
dem:=dem+1;
vt[dem]:=i;
end;
end;
writeln(vt[dem]);
readln;
end.
Câu 2:
uses crt;
var a:array[1..30]of integer;
i,n,kt:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
kt:=0;
for i:=1 to n-1 do
if a[i]>=a[j] then kt:=1;
if kt=0 then writeln('Day la day so khong giam')
else writeln('Day khong la day so khong giam');
readln;
end.
uses crt;
var n, i, j, dem: longint; {Bạn có thể thay longint thành integer nha}
A:array[1..1000] of longint;
begin
clrscr;
Write('Nhap N: '); readln(n);
for i:=1 to n do
begin
write('Nhap phan tu thu ',i,': ');
readln(A[i]);
end;
Write('Cac so nguyen to co trong mang la: ');
for i:=1 to n do
begin
dem:=0;
for j:=2 to A[i]/2 do
if A[i] mod j=0 then dem:=dem+1;
if dem=0 then write(A[i],'; ');
end;
end.
uses crt;
var a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to n do
t:=t+a[i];
writeln(t);
readln;
end.
gõ được mà bạn