My issue
can you help me to give solution of this
My code
#include <stdio.h>
int main(void) {
int m,n,p;
scanf("%d %d",&m,&n);
p=m-n;
printf("%d",p);
}
Learning course: 500 difficulty rating
Problem Link: Donation Drive Practice Problem in - CodeChef
#include <stdio.h>
int main(void) {
// your code goes here
int t;
scanf("%d", &t);
while(t--){
int m,n;
scanf("%d %d", &m, &n);
printf("%d\n", m-n);
}
}
Your mistake was that you are not taking input for the cases you have to take, first, take the cases so that your code iterates that number of times to receive its input.