fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int num,i;
  6. printf("enter num");
  7. scanf("%d",&i);
  8. printf("%d",i);
  9. return 0;
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
4
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:6:20: error: ‘printf’ was not declared in this scope
  printf("enter num");
                    ^
prog.cpp:7:15: error: ‘scanf’ was not declared in this scope
  scanf("%d",&i);
               ^
prog.cpp:5:7: warning: unused variable ‘num’ [-Wunused-variable]
   int num,i;
       ^
stdout
Standard output is empty