fork download
  1. using namespace std;
  2. main()
  3.  
  4. {
  5. int n,a;
  6. cin >> n;
  7. for (int i=1; i<=n; i++)
  8. {
  9. cin >> a;
  10.  
  11.  
  12.  
  13.  
  14. for (int p=2; p<10000; p++)
  15. {
  16. if (a==1)
  17. {
  18. cout<<"Nie"<<endl;
  19. break;
  20. }
  21. else
  22. {
  23.  
  24.  
  25. if (a%p!=0)
  26. {
  27. cout<<"Tak"<<endl;
  28. break;
  29. }
  30. else
  31. {
  32. cout<<"Nie"<<endl;
  33. break;
  34. }
  35. }
  36. }
  37. }
  38. return(0);
  39. }
  40.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:6:5: error: 'cin' was not declared in this scope
     cin >> n;
     ^
prog.cpp:18:17: error: 'cout' was not declared in this scope
                 cout<<"Nie"<<endl;
                 ^
prog.cpp:18:30: error: 'endl' was not declared in this scope
                 cout<<"Nie"<<endl;
                              ^
prog.cpp:27:17: error: 'cout' was not declared in this scope
                 cout<<"Tak"<<endl;
                 ^
prog.cpp:27:30: error: 'endl' was not declared in this scope
                 cout<<"Tak"<<endl;
                              ^
prog.cpp:32:17: error: 'cout' was not declared in this scope
                 cout<<"Nie"<<endl;
                 ^
prog.cpp:32:30: error: 'endl' was not declared in this scope
                 cout<<"Nie"<<endl;
                              ^
stdout
Standard output is empty