Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- read(num);
- int i:=0, index:=1;
- while i<num do
- begin
- i:=index+i;
- index:=index+1;
- end;
- if(i=num) then
- write('O numero ', num, ' é perfeito.');
- else
- write(nao);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement