#include <iostream> using namespace std; void main (){ int x, a; cout << "x:"; cin >> x; if (x <= -4) { __asm { mov eax, x mul x mov edx,0 sub edx,eax add edx,1 mov x,edx } cout<<x; } return 0;}
Standard input is empty
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 ^~~
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!