Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a, i=1;
- cout << "Type a" << endl;
- cin >> a;
- _asm {
- //abs
- mov eax,a
- cmp eax,0
- jge GRT_EQL
- mov ebx,-1
- imul ebx
- GRT_EQL:
- //count order
- beg_ord :
- cmp eax, 10
- jl end_ord
- mov ebx, 10
- xor edx, edx
- cdq
- idiv ebx
- //i++
- mov ebx, i
- add ebx, 1
- mov i, ebx
- jmp beg_ord
- end_ord :
- }
- cout << "Order: " << i << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment