i am new to cprogramming and i want to do this thing. all in all i have 2 problems
1)how do you add answers?
ans1+ans2=ans3//i cant do this part
2)Next problem is that i cant add switches is there something i am doing wrong?
i wanted to add cases.
using namespace std;
int main(int argc, char *argv)
printf("how many product A: \n");
printf("how many product B: \n");
printf("how many product C: \n");
total=(case 1*10)+(case 2*20)+(case 3*30);
\\ unit price of product A is 10, product B is 20, product C is 30
printf("total amout due is: %lf \n", total);
printf("enter amount paid by customer: \n");
change=total-cash;\\still not working
printf("total change will be: \n", change);