i want to solve this problem>>After that the code will select a random problem for you from my problems database based on your previously solved problems, your skills and your weaknesses. But while I was coding for implementing this great idea, I found that, all of my problems are scattered in 2 computers. So, I have to merge them before running my code.

Now you are given the number of problems in each of the computers, you have to find the total number of problems. You can safely assume that no problem is stored in multiple computers. So, all the problems are distinct.
Input

Input starts with an integer T (≤ 125), denoting the number of test cases.

Each case starts with a line containing two integers a and b. a denotes the number of problems in the first computer and b denotes the number of problems in the second computer. You can safely assume that a and b will be non-negative and not greater than 10.
Output

For each case, print the case number and the total number of problems. See the samples for exact formatting.
Sample Input

Output for Sample Input

2

1 7

9 8

Case 1: 8

Case 2: 17

.......
here is my solution.

include<stdio.h>
#include<stdio.h>
int main(){
int t,a,b,i;
scanf("%d",&t);
if(t<=125){
for(i=1;i<=t;i++){
scanf("%d %d",&a,&b);
if(a<10 && b<10)
printf("case %d:%d\n",i,a+b);
  }
}

return 0;
}

but it's seem wrong answer where is my problem//

Your basic algorithm seems sound. Your problem with getting the correct answer could have something to do with how the site giving you the problem is expecting you to receive the data.

A couple of things, though:

The bounds checks are unnecessary, since the problem description guarantees the numbers will be in bounds.

Using <= to check that the for loop has reached the limit is inefficient. If you start i at 0 and check that i<t, you'll only be checking for less than on each iteration instead of less than and equals

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.