newbie problem

help me whats the problem of my code ::

#include <cstdio>


int main()
{
int cases, a, b, c;
scanf("%d",&cases);
while (cases--)
{
scanf("%d",&a);
for(b=0;b++)
{
if(a==0) break;
if((a%2)==1) {a-=a; b+=b}
else{a=a/2; b+=b}
}
if((b%2)==0) {printf("Aayush")}
else{printf("Akash")}
}
return 0;
}
1) What does your program do?
2) Why don't you try debug it piece by piece?
3) What should it output if it worked?
for(b=0;b++) //?
Topic archived. No new replies allowed.