Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  1000
Language: C/C++
Code:
#include <stdio.h>
int main()
{
    int a[125],b[125],i,t,j,k=0,sum=0;
    scanf("%d",&t);
    if(t<=125)
    {
        for(i=0;i<t;i++)
        {
            printf("n");
            for(j=0;j<2;j++)
            {
                scanf("%d",&a[j]);
                if(a[j]>0 && a[j]<10)
                    sum=sum+a[j];
            }
            b[k]=sum;
            sum=0;
            k++;
        }

    for(k=0;k<t;k++)
        printf("Case %d: %dn",k+1,b[k]);

    }

    return 0;
}

          
Comments: