My issue
My code
#include <iostream>
using namespace std;
int main() {
int x;
int ans;
cin>>x;
ans = x*15;
return 0;
}
// your code goes here
Problem Link: SQUATS Problem - CodeChef
#include <iostream>
using namespace std;
int main() {
int x;
int ans;
cin>>x;
ans = x*15;
return 0;
}
// your code goes here
Problem Link: SQUATS Problem - CodeChef
@rutikaaher334
your logic is all right but your code ain’t working because you have not printed your variable ans in which you have stored the output .
juts write
cout<<ans<<endl;
Moreover you have not started a loop to take multiple test cases .
this means u have to make your code run multiple times so that it can take multiple inputs .
I have pasted my code below with comments
hope this helps !!!
include
using namespace std;
int main() {
int t;//input for how many times my code should run .
cin>>t;
while(t--){//loop
int x ;
cin>>x;
cout<<x*15<<endl;
}
return 0;
}