fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void main ()
  6. {
  7. int x, a;
  8. cout << "x:";
  9. cin >> x;
  10. if (x <= -4)
  11. {
  12. __asm
  13. {
  14. mov eax, x
  15. mul x
  16. mov edx,0
  17. sub edx,eax
  18. add edx,1
  19. mov x,edx
  20.  
  21. }
  22. cout<<x;
  23. }
  24. return 0;
  25. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:5:12: error: ‘::main’ must return ‘int’
 void main ()
            ^
prog.cpp: In function ‘int main()’:
prog.cpp:13:7: error: expected ‘(’ before ‘{’ token
       {
       ^
       (
prog.cpp:14:10: error: ‘mov’ was not declared in this scope
          mov eax, x
          ^~~
stdout
Standard output is empty