Help me in solving CCHOCOLATES problem

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

@shilpi_1234567
plzz refer the following solution

#include<stdio.h>
main(){
	int t,x,y,z,i,a,b,c,d;
	scanf("%d",&t);
	for(i=0;i<t;i++){
		scanf("%d%d%d",&x,&y,&z);
		a=x*5;
		b=y*10;
		c=a+b;
		d=c/z;
		printf("%d\n",d);	
		
	}
}