so hoan hao

1 275 0
so hoan hao

Đang tải... (xem toàn văn)

Thông tin tài liệu

Var dem,i,n:integer; Function TU(x:integer):integer; var i,tong:integer; begin tong:=0; for i:=1 to x do if x mod i=0 then tong:=tong+i; TU:=tong-x; end; Begin Readln(n); dem:=0; For i:=1 to n do if i=TU(i) then inc(dem); Writeln('Co ',dem,' so hoan hao: '); For i:=1 to n do if i=TU(i) then Write(i:3); readln end.

Ngày đăng: 30/06/2014, 05:00

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan