Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int test(int n, int m, int k) {
- int firstResult = 0;
- int secondResult = 0;
- _asm {
- mov eax, 0
- mov eax, n
- mul k
- mov ecx, eax
- mov eax, 1
- for:
- mul ecx
- dec ecx
- cmp ecx,0
- jg for
- mov firstResult, eax
- mov eax, 0
- mov eax, n
- sub eax, k
- mov ecx, eax
- mov eax, 1
- for2:
- mul ecx
- dec ecx
- cmp ecx, 0
- jg for2
- mov secondResult, eax
- mov eax, 0
- mov eax, firstResult
- div secondResult
- mul m
- return:
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement