+ 2

Help! Is the Skee Ball Challenge bugged?

Why does my try at the Skee Ball Challenge not work? Please tell me my errors and how I can improve my code: https://www.sololearn.com/post/617423/?ref=app

27th Sep 2020, 2:06 AM
Query
Query - avatar
12 Respostas
+ 7
{The Piqued Learner} Remove string buyOrNot!!! Also you wrote the output wrong. It's "Buy it!" Not "Buy It!"
27th Sep 2020, 4:41 AM
Minho
Minho - avatar
+ 5
{The Piqued Learner} Just copy paste it in the play ground. It'll work. #include <iostream> using namespace std; int main() { int numberOfPoints; int squirtGunPriceInTix; cin>>numberOfPoints ; cin>>squirtGunPriceInTix; numberOfPoints = (numberOfPoints/12); if(numberOfPoints>=squirtGunPriceInTix) cout<<"Buy it!"; else cout<<"Try again"; return 0; }
27th Sep 2020, 4:47 AM
Minho
Minho - avatar
+ 5
{The Piqued Learner} Great buddy â˜șïžđŸ‘
27th Sep 2020, 4:50 AM
Minho
Minho - avatar
+ 4
{The Piqued Learner} Challenge is not bugged. In your code what is string buyOrNot doing? Remove that line.. It'll work.
27th Sep 2020, 3:11 AM
Minho
Minho - avatar
+ 2
27th Sep 2020, 4:45 AM
Query
Query - avatar
+ 2
Minho đŸ‡°đŸ‡· Thanks, but I edited it before you sent me the copy.
27th Sep 2020, 4:49 AM
Query
Query - avatar
+ 1
Minho đŸ‡°đŸ‡· It gave me more failed test cases, with one actually correct but indicated failed.
27th Sep 2020, 4:36 AM
Query
Query - avatar
+ 1
🎾🎾🎾 Here: #include <iostream> using namespace std; int main() { int numberOfPoints; int squirtGunPriceInTix; string buyOrNot; cin >> numberOfPoints; cin >> squirtGunPriceInTix; numberOfPoints = numberOfPoints / 12; if (numberOfPoints >= squirtGunPriceInTix) { cout << "Buy It!"; } else { cout << "Try again"; } return 0; }
27th Sep 2020, 4:37 AM
Query
Query - avatar
+ 1
It's tiring going back and forth... Here tho: https://www.sololearn.com/post/617744/?ref=app
27th Sep 2020, 4:40 AM
Query
Query - avatar
+ 1
Minho đŸ‡°đŸ‡· THE PROBLEM IS NOT WITH THE LINE!!! ITS JUST THE 'Buy it!'
27th Sep 2020, 4:43 AM
Query
Query - avatar
+ 1
One of the most simplest solution for this challenge int main() { int point, cost; cin>>point>>cost; if((point/12)>=cost) cout<<"Buy it!"; else cout<<"Try again"; return 0; } If there is any mistakes, point it out and notify me
7th Oct 2020, 6:36 PM
salman
salman - avatar