Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int number,exact=0;
- cout<<"Enter number : ";
- cin>>number;
- for(int i=1;i<number;i++){
- if(number%i==0)
- exact+=i;
- }
- if(exact==number)
- cout<<"\nIt is exact number";
- else
- cout<<"\nIt is not an exact number";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement