Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {int alin;
  7. int petre=1;
  8. cin>>alin;
  9. int ana=2;
  10. while (ana<=alin/2 && petre==1)
  11. {
  12.  
  13. if (alin%ana==0)
  14. petre=4;
  15. ana++;}
  16.  
  17. if(petre==1)
  18. cout<<" alin e numar prim";
  19. else cout<<" alin nu e numar prim";
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement