fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a=20, b=30,c;
  6. int c= a*b;
  7. cout<<"the result is"<<c;
  8.  
  9.  
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:6:6: error: redeclaration of ‘int c’
  int c= a*b;
      ^
prog.cpp:5:17: note: ‘int c’ previously declared here
  int a=20, b=30,c;
                 ^
stdout
Standard output is empty