void main()
{
int numTickets;
float discount;
float total = 0.0;
int numKids = 0;
float ticketPrice = 19.00;
printf("Enter number of tickets: ");
scanf("%d", &numTickets);
if (numTickets > 10)
{
discount = 0.15;
}
else
{
discount = 0.0;
}
printf("Enter number of children: ");
scanf("%d", &numKids);
total = numKids*ticketPrice/2.0 + (numTickets – numKids)*ticketPrice;
total = total*(1.0 – discount);
printf("Total = %.2f \n", total);
}
В основном, я помогаю моему кузену учиться, и один из вопросов - нарисовать блок-схему для этого. проблема в том, что я забыл все, что я знал о блок-схемах! Есть ли стандарт для переменных declerations наверху? Я могу сделать все остальное на самом деле, просто не знаю, как их запустить!