Help with switch case.. Where i go wrong

suppose to sow the total cost of apples from 4 types with tax.has to use switch case

//David vitols

#include <iostream>

using namespace std;

int main(){
char appletype;
int num,num1,num2,num3,num4;

cout<<"Enter An Apple type"<<endl;
cout<<"P= Premium ,J= Juicy ,S= Snack C= cooking"<<endl;
cin >> appletype;
switch(appletype)
{
case'P':
cout<<"enter amount of premuim apples"<<endl;
cin>>num;
case 'J':
cout<<"enter amount of juicy apples"<<endl;
cin>>num1;
case 'S':
cout<<"enter amount of snack apples"<<endl;
cin>>num2;
case'C':
cout<<"enter amount of cooking apples"<<endl;
cin>>num3;
}
cout<<"Total amount of all apples"<<endl;
cout<<((num*.4)+(num1*.03)+(num2*.02)+(num3*.01))*1.07<<endl;
system ("pause");
return 0;}



Topic archived. No new replies allowed.