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);
}
基本的に、私のいとこの研究を手伝っています。質問の1つは、そのフローチャートを描くことです。問題は、フローチャートについて私が今まで知っていたすべてを忘れてしまったことです。上部に可変デクレレーションの基準はありますか?私はそれの残りを実際に補うことができます、ただもうそれらを始める方法がわからないだけです!