/* Problem 1 One airline company charges 15% extra for tickets in the first 5 rows and gives 7% discount for tickets in the last 5 rows. Write a program that first reads the base price for one ticket and the number of rows on the airpline. Two family members are boarding the plane. The program reads the row number of each ticket. The program finds the final cost of each ticket, the total cost of the tickets, and the average ticket price. You can assume that input is valid. Example price=299.99 total_rows=15 person1 row = 2 person2 row = 13 total=299.99*(1+15/100.0)+299.99*(1-7/100.0)=623.9792 15 rows 5 first rows: 1, 2, 3, 4,5 5 last rows: 15, 14, 13, 12, 11 */ #include int main(){ int num_rows, row_num,size_family, i=0; double price, total=0.0; printf("enter number of family members\n"); scanf("%d",&size_family); //assume input valid printf("enter number of rows\n"); scanf("%d",&num_rows); printf("enter base price\n"); scanf("%lf",&price); while(inum_rows-5) total+=price*0.93; else total+=price; i++; } printf("total price %f\n",total); return 0; }