fork download
  1. #include <iostream>
  2. #define M_PI 3,14
  3. using namespace std;
  4.  
  5. void main()
  6. {
  7. fprintf(stdout, "Geben Sie ihre Daumenlänge ein!");
  8. char* eingabe;
  9. eingabe = new char[20];
  10. gets(eingabe);
  11.  
  12. int daumenlaenge = atoi(eingabe);
  13. cout << "Pi mal Daumen ist bei ihnen " << (*eingabe * M_PI) << endl;
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:5: error: ‘::main’ must return ‘int’
prog.cpp: In function ‘int main()’:
prog.cpp:12: error: ‘atoi’ was not declared in this scope
prog.cpp:13: warning: left-hand operand of comma has no effect
prog.cpp:12: warning: unused variable ‘daumenlaenge’
prog.cpp:10: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result
stdout
Standard output is empty