fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <cstdlib>
  4. using namespace std;
  5. void myth(int x){
  6. for(int f=2; f<=x; f++){
  7. if(x%f == 0){
  8. cout << f << endl;
  9. myth(x/f);
  10. return;
  11. }
  12. }
  13. }
  14. int main(int argc, char* argv[]){
  15. int n = atoi(argv[1]);
  16. myth(n);
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, or enum expected
#include <iostream>
         ^
Main.java:2: error: illegal character: '#'
#include <string> 
^
Main.java:3: error: illegal character: '#'
#include <cstdlib> 
^
Main.java:5: error: class, interface, or enum expected
void myth(int x){   
^
Main.java:6: error: class, interface, or enum expected
    for(int f=2; f<=x; f++){
                 ^
Main.java:6: error: class, interface, or enum expected
    for(int f=2; f<=x; f++){
                       ^
Main.java:9: error: class, interface, or enum expected
            myth(x/f);     
            ^
Main.java:10: error: class, interface, or enum expected
            return;  
            ^
Main.java:11: error: class, interface, or enum expected
            } 
            ^
Main.java:16: error: class, interface, or enum expected
    myth(n);
    ^
Main.java:17: error: class, interface, or enum expected
    }
    ^
12 errors
stdout

Standard output is empty