i'm getting wrong answer for the following code ... any help would be appreciated....
is my logic correct for the following code...
[code]//parenthesis balance
#include <stdio.h>
int main()
{
char ch[128];
int cas,i,j,a,b;
int sum1,sum2;
scanf("%d",&cas);
for(i=0;i<cas;i++)
{
scanf("%s",&ch);
sum1=0,sum2=0;
for(j=0;ch[j]!='\0';j++)
{
if(ch[j]>90)
sum1+=ch[j];
else
sum2+=ch[j];
}
if(sum1%2==0)
a=1;
else
a=0;
if(sum2<81)
{
if(sum2==0)
b=1;
else
b=0;
}
else
{
if(sum2%81==0)
b=1;
else
b=0;
}
if(a*b==1)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}[code]

