plz plz help me how can solve this.i dont know how to run programme.plz help me

User Generated

ivquv

Computer Science

Description

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Q.1

#include<stdio.h>

#include<conio.h>

void main()

{

int i,choice;

float prefix,price=0.0;

char *country[4] = {"California","Texas","NewYork","Hawaii"}; 

float tax[4] = {10,8.25,8.875,4.712};

printf("Please enter the prefix amount: ");

scanf("%f",&prefix);

printf("\nselect your state:\n");

for(i = 0;i<4;i++)

{

printf("1%d - %s",i+1,country[i]);

}

 printf("Enter your input: \n");

scanf("%d",&choice);

switch(choice)

{

case 1:price =prefix *(tax[choice-1]/100);break;

case 2:price =prefix *(tax[choice-1]/100);break;

case 3:price =prefix *(tax[choice-1]/100);break;

case 4:price =prefix *(tax[choice-1]/100);break;

default: printf("Please enter a valid choice");

}

printf("\nThe sale price of the product is %f",price);

printf("\nPress any key to continue...");

}

Please choose as best answer.


Anonymous
Goes above and beyond expectations!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags