**New course!**Every coder should learn

**Generative AI!**

# Kaleidoscope Problem

I was solving the kaleidoscope problem in code coach.Why is it showing an error in test case 3 and 5 ? // program is solved by me... //here no external help is taken //because it was a easy problem #include <iostream> using namespace std; int main() { int n; //number of kaleido..... cin>>n; if(n==1){ float cost; cost=5+((5*7)/100.00); cout<<cost;//output-- 5.35 when cost is evaluated } else{ float cost; //calculate cost= n*5; //calculate discount float discount=cost/10.00;//since 10percent is equal to divide 10.... //now calculate cost cost= cost-discount; //tax of 7 percent //i am now not making another variable just directly calculating cost by adding tax 7 percent.... cost=cost + ((cost*7)/100.00); //printing cost price... cout<<cost; } return 0; } https://sololearn.com/compiler-playground/c1m9r4KiAMFJ/?ref=app