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 n, i : integer;
begin clrscr;
readln(n);
for i:=1 to 9 do writeln(n,' x ', i, ' = ', n*i);
readln;
end.
program MultiplicationTable;
uses crt;
var
N, i, j: integer;
begin
clrscr;
write('Enter N: ');
readln(N);
for i := 1 to 9 do
begin
writeln(N, ' x ', i, ' = ', N*i);
end;
readln;
end.
Câu 6:
uses crt;
var n,i:integer;
begin
clrscr;
readln(n);
for i:=1 to n do
if n mod i=0 then write(i:4);
readln;
end.
5:
uses crt;
var n,i,dem:integer;
begin
clrscr;
readln(n);
dem:=0;
for i:=0 to n do
if i mod 2=1 then
begin
write(i:4);
dem:=dem+1;
end;
writeln;
writeln(dem);
readln;
end.
Câu 1:
uses crt;
var s,i,n:integer;
begin clrscr;
s:=0;
write('Nhap n: ');readln(n);
for i:=1 to n do
if i mod 2 <> 0 then inc(s,i);
write('Tong cac so le tu 1 den ',n,' la: ',s);
readln
end.
Câu 2:
uses crt;
var s,i,n:integer;
begin clrscr;
s:=0;
write('Nhap n: ');readln(n);
for i:=1 to n do
if i mod 2 = 0 then inc(s,i);
write('Tong cac so le tu 1 den ',n,' la: ',s);
readln
end.
Câu 1:
Program HOC24;
var i,p: integer;
t: longint;
begin
write('Nhap P: '); readln(p);
t:=0;
for i:=1 to p do if i mod 2<>0 then t:=t+i;
write('Tong cac so le la: ',t);
readln
end.
Câu 1:
program Tinhtong:
var
n, i, sum: integer;
begin
write('Nhap n: ');
readln(n);
sum := 0;
for i := 2 to n do
begin
if i mod 2 = 0 then
begin
sum := sum + i;
end;
end;
writeln('Tong cac so chan tu 2 toi ', n, ' la ', sum);
readln;
end.
Câu 2:
program Tinhtong:
var
n, i, sum: integer;
begin
write('Nhap n: ');
readln(n);
sum := 0;
for i := 1 to n do
begin
if i mod 2 = 1 then
begin
sum := sum + i;
end;
end;
writeln('Tong cac so le tu 1 toi ', n, ' la ', sum);
readln;
end.
a)
uses crt;
var i,n:integer;
begin
clrscr;
repeat
write('Nhap n='); readln(n);
until n<100;
if n mod 2=0 then
begin
for i:=0 to n do
if i mod 2=0 then write(i:4);
end
else writeln(n,' khong la so chan');
readln;
end.
b)
uses crt;
var i,n:integer;
begin
clrscr;
repeat
write('Nhap n='); readln(n);
until n<100;
if n mod 2=1 then
begin
for i:=1 to n do
if i mod 2=1 then write(i:4);
end
else writeln(n,' khong la so le');
readln;
end.
1)
var n: integer ;
write('nhap gia tri n'); readln(n);
for 1 to n do
if i mod 2 =1 then write(i:3);
readln
end.
2)
var s,j:integer; n,i:byte; begin write(' nhap n : '); readln(n); s:=n; writeln(n,' * ','1',' = ',n); for i:= 2 to 10 do begin s:= s + n; for j:= 1 to 32600 do if j = 32600 then writeln(n,' * ',i,' = ',s); end; readln; end.