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 i,n:integer;
begin
clrscr;
readln(n);
for i:=1 to n do if n mod i=0 then write(i:4);
readln;
end.
program tim_uoc;
uses crt;
var i,n,tong:integer;
begin
clrscr;
write('nhap so n:');readln(n);
i:=1;tong:=0;
writeln('cac uoc cua ',n,' la:');
while i<=n do
if n mod i=0 then
begin
write(i:3);
inc(i);
end;
writeln;
i:=1;writeln('cac uoc chan:');
while i<=n do
begin
if n mod i=0 then
begin
if i mod 2=0 then write(i:3);
tong:=tong+i;
end;
end;
writeln;
write('tong cac uoc chan:',tong);
readln;
end.
uses crt;
var n,i,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
i:=1;
writeln('Cac uoc cua ',n,' la: ');
while i<=n do
begin
if n mod i=0 then write(i:4):
i:=i+1;
end;
writeln;
writeln('Cac uoc chan cua ',n,' la: ');
t:=0;
i:=1;
while i<=n do
begin
if (n mod i=0) then
begin
t:=t+i;
write(i:4);
end;
inc(i);
end;
writeln('Tong cac uoc chan cua ',n,' la: ',t);
readln;
end.
program bang_cuu_chuong;
uses crt;
var n,tich,i:integer;
begin
clrscr;
n:=2;i:=1;
while n<=9 do
begin
while i<=10 do
begin
tich:=n*i;
writeln(n,' x ',i,' = ',tich);
i:=i+1;
end;
n:=n+1;i:=1;
end;
readln;
end.
var i,n,s,du,dem:integer;
Begin
While n<=0 do
Begin
Write('N = ');readln(n);
End;
For i:=1 to n do
If n mod i = 0 then
Begin
Write(i:7);
du:=du+1;
s:=s+i;
End;
Writeln('So uoc cua ',n,' la ',du);
Writeln('Tong cac uoc cua ',n,' la ',s);
For i:=1 to s do
If s mod i = 0 then dem:=dem+1;
If dem=2 then write(s,' la so nguyen to')
Else write(s,' khong la so nguyen to');
Readln;
End.
uses crt;
var i:integer;
begin
clrscr;
i:=10;
while i>=5 do
begin
write(i:4);
i:=i-1;
end;
readln;
end.
Uses crt;
var i,n: integer;
begin clrscr;
i:=12345;
while(i<>0) do begin
n:=i mod 10; write(n,' ');
i:=i div 10;
end;
readln;
end.
c++:
#include <iostream> //tim tat ca uoc cua n.using namespace std;
int main() {
int n;
cout << "Nhap so n: ";
cin >> n;
cout << "Tat ca cac uoc cua so " << n << " la ";
for(int i = 1; i <= n; i++) {
if(n % i == 0) {
cout << i << " ";
}
}
return 0;
}