There are three seating categories at a stadium. For a softball game, Class A se
ID: 3644649 • Letter: T
Question
There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class B seats cost $12, and Class C seats cost $9. Write a program t asks how many tickets for each class of seats were sold, then displays the amount of income generated from ticket sales. Format your dollar amount in fixed-point notation, with two decimal places of precision, and be sure the decimal point is always displayed. The application's form should resemble the one shown in the following figure: Use the following test data to determine if the application is calculate property:Explanation / Answer
#include<stdio.h>
int main(){
int a_num,b_num,c_num;
float a_cost=15.00,b_cost=12.00,c_cost=9.00;
printf("How may tickets were sold for class A ? ");
scanf("%d",&a_num);
printf("How may tickets were sold for class B ? ");
scanf("%d",&b_num);
printf("How may tickets were sold for class C ? ");
scanf("%d",&c_num);
float income=a_cost*a_num+b_cost*b_num+c_cost*c_num;
printf("Amount of income generated from ticket sales is %.2f ",income);
return 0;
}