My issue
include
using namespace std;
void chocolate()
{
int x,y,z;
cin>>x>>y>>x;
cout<<((x5)+(y10));
}
int main() {
int T;
cin>>T;
while(T>0)
{
chocolate();
T–;
}
return 0;
}
I am doing this que by this way, first taking a variable as input for getting the total test cases then a while loop till that input value, and tyen getting into a function named as chocolate() getting values but still not the green signal nfrom here
i have run it on multiple c++ compiler its working there but not here
My code
#include <iostream>
using namespace std;
void chocolate()
{
int x,y,z;
cin>>x>>y>>x;
cout<<((x*5)+(y*10));
}
int main() {
int T;
cin>>T;
while(T>0)
{
chocolate();
T--;
}
return 0;
}
Learning course: Basic Math using C++
Problem Link: CodeChef: Practical coding for everyone