fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int c=0;
  6. int n,i;
  7. cout<<"enter a no";
  8. cin>>n;
  9. for(i=1;i<=n;i++)
  10. {
  11. if(n%i==0)
  12. c++;
  13. }
  14. if(c==2)
  15. cout<<"prime nos.";
  16. else
  17. cout<<"niot a prime no"
  18. // your code goes here
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:19:2: error: expected ‘;’ before ‘return’
  return 0;
  ^~~~~~
stdout
Standard output is empty