i have to write a code that gives total cost of movie tickets
and here is what i did..and i dont get what to do..it just don't work..keep giving wrong answer..could somebody please solve this screwed code..
===================================
#include <stdio.h>
void main()
{
int x;
int numberOfTicketA,numberOfTicketC,numberOfTicketS;
int adult=12.50;
int child=8.00;
int senior=6.00;
int calcTotal = (numberOfTicketA*adult)+(numberOfTicket*child)+(nu mberOfTicketS*senior);
printf("Select the tickets you want to buy: \n1 adult\n2 child\n3 senior \n4 get total amount);
scanf("%d",&x);
do
{
if (x==1)
{
printf("Enter the number of tickets you wish to buy");
scanf("%d",&numberofTicketA);
}
else if(x==2)
{
printf("Enter the number of tickets you wish to buy");
scanf("%d",&numberOfTicketC);
}
else if(x==3)
{
printf("Enter the number of tickets you wish to buy");
scanf("%d",numberOfTicketS);
}
while(x==1||x==2||x==3);
}
if(x==4)
{
Printf("The total cost is $%d",&calcTotal);
}
else
{
printf("Error");
}
}