My issue
include <stdio.h>
int main(void) {
int z,t,n;
int x=5;
int y=10;
scanf(“%d”,&t);
for(int i=1;i<t;i++){
z = x5 + y 10/n;
printf(“%d\n”,z);
}
return 0;
}
My code
#include <stdio.h>
int main(void) {
int z,t,x,y;
int total_troffee;
int total_paise;
scanf("%d",&t);
while(t--){
scanf("%d %d",&x,&y);
total_paise = x*5+y*10;
// printf("%d",total_paise);
// if()
int n = total_paise/z;
printf("%d\n",n);
}
return 0;
}
Learning course: Basic Math using C
Problem Link: Chef and Chocolates Practice Problem in - CodeChef