Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- printf("A to AdditionnD to Descountn");
- scanf("%c", &switchChoose);
- switch (switchChoose) {
- case 'A':
- printf("Entering case A...n");
- printf("Enter product price:n");
- scanf("%f", &productPrice);
- reajustedPrice = productPrice + (productPrice * (percentageValue / 100));
- printf("Total price: %.2f", reajustedPrice);
- break;
- case 'D':
- printf("Entering case D...n");
- printf("Enter product price:n");
- scanf("%f", &productPrice);
- reajustedPrice = productPrice - (productPrice * (percentageValue / 100));
- printf("Total price: %.2f", reajustedPrice);
- break;
- }
- switch (switchChoose) {
- case 'A':
- printf("Entering case A...n");
- printf("Enter product price:n");
- scanf("%f", &productPrice);
- reajustedPrice = productPrice + (productPrice * 0.03);
- printf("Total price: %.2f", reajustedPrice);
- break;
- case 'D':
- printf("Entering case D...n");
- printf("Enter product price:n");
- scanf("%f", &productPrice);
- reajustedPrice = productPrice - (productPrice * 0.03);
- printf("Total price: %.2f", reajustedPrice);
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement