Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
assembly#include <iostream> using namespace std; int main(void){ int a,b,i,r; cin>>a>>b; __asm{ mov r,0; l2:; cmp a,0; jz l3; mov eax,b; mov i,eax; l1: mov edx,0; mov eax,a; mov ebx,10; div ebx; mov ecx,edx mov edx,0; mov eax,i; mov ebx,10; div ebx; mov eax,edx; mul ecx; add r,eax; mov edx,0; mov eax,i; mov ebx,10; div ebx; mov i,eax; cmp i,0; jnz l1; mov edx,0; mov eax,a; mov ebx,10; div ebx; mov a,eax; jmp l2; l3: } cout<<r; return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator