Sohel vai reads newspaper every morning. The newspaper he reads contains some good features includin…
Click here to read the complete problem statement.
If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.
#include <iostream>
using namespace std;
int main() {
unsigned int i,t,a,b,sum;
cin>>t;
for(i=1;i<=t;i++){
cin>>a>>b;
if(a<=100&&b<=100){
sum=10*(a+b)+(a-b);
cout<<"Case "<<i<<": "<<sum<<endl;
}
}
return 0;
}
t=int(input())
for i in range(1,t+1):
a,b=[int(x) for x in input().split()]
sum=10*(a+b)+(a-b)
print(“Case {}: {}”.format(i,sum))
both says second test case wrong answer
Where is the problem in my code?
#include<stdio.h>
#inculde<math.h>
int main()
{
int T;
scanf(“%d”,&T);
for ( int i=1;i<=T;i++){
int N,M;
scanf(“%d %d”,&N,&M);
int Sum=N+M;
int Count =(Sum*10)+(N-M);
printf(“Case %d: %d”,i,Count);
}
return 0;
}