Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int a;
- cout << "Type element" << endl;
- cin >> a;
- _asm {
- //abs
- mov eax, a
- cmp eax, 0
- jge GRT_EQL
- mov ebx, -1
- imul ebx
- GRT_EQL :
- //rank
- mov ecx,0 //
- BEG_1_:
- //{
- cmp eax,0
- je END_1_
- ///{
- mov ebx,2
- cdq
- idiv ebx
- cmp edx,1
- jne NEQL
- ////{
- add ecx,1//t++
- ////}
- NEQL:
- ////{
- ////}
- jmp BEG_1_
- ///}
- END_1_:
- //}
- inc ecx
- mov eax,ecx
- mov ebx,2
- cdq
- idiv ebx
- cmp edx,0
- je EVEN
- }
- cout << a << " - ODD" << endl;
- system("pause");
- return 0;
- EVEN:
- cout << a << " - EVEN" << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment