Help me in solving CCHOCOLATES problem

My issue

what is problem in this code

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	int p,q,a,b,r,d,m;
	cout<<"total no of 5 rupees coin";
	p=5*a;
cin>>p;
cout<<"total no 10 rupees coin";
q=10*b;
cin>>q;
d=p+q;
cout<<"total money";
cout<<d;
cout<<"cost of choclate";
cin>>r;
m=d/r;
cout<<"no of choclates can be buy";
cout<<m;
return 0;
}

Learning course: Basic Math using C++
Problem Link: Chef and Chocolates Practice Problem in - CodeChef

@urvid78
u have to do it simply like this

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	
	while(t--){
	    int x,y,z;
	    cin>>x>>y>>z;
	    int noc=0;
	    int sum;
	    sum=5*x+10*y;
	    if(sum>=z){
	       noc=sum/z;
	    }
	    cout<< noc<<endl;
	}
	return 0;
}