Search found 1 match

by anikpro
Thu May 07, 2015 9:40 am
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 101927

Re: 10035 - Primary Arithmetic

Why WA ????


#include <stdio.h>

int main()
{
long long int a, b;
int flag=0;

while(scanf("%lld %lld", &a, &b) && a>0 || b>0)
{
if(a < b)
{
int swap = a;
a = b;
b = swap;
}
for(int i=1;; i++)
{
if(a==0 && b==0)
break;
int rem1, rem2;
rem1 = a%10;
rem2 = b%10;
a = a/10;
b = b/10 ...

Go to advanced search