fork(3) download
  1. #include <cstdlib>
  2. #include <iostream>
  3. #include <math.h>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int n=13;
  9.  
  10. //cin >> n;
  11. for (int i=2;i<sqrt(n);i++)
  12. {
  13. if (n%i==0)
  14. {
  15. cout << "Chislo " <<n<< " ne prostoe" <<endl;
  16. system("PAUSE");
  17. return 0;
  18.  
  19. }
  20. }
  21. cout << "Chislo " <<n<< " prostoe" <<endl;
  22.  
  23.  
  24.  
  25. system("PAUSE");
  26. return EXIT_SUCCESS;
  27. }
Success #stdin #stdout #stderr 0s 3296KB
stdin
Standard input is empty
stdout
Chislo 13 prostoe
stderr
sh: PAUSE: not found