/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include<stdio.h>
void main()
{
float age,price,c;
printf("enter the age: ");
scanf("%f",&age);
printf("enter the ticket price: ");
scanf("%f",&price);
if(age<14)
{
c=price-(price*50)/100;
printf("final price: %f",c);
}
else if(age>50)
{
c=price-(price*20)/100;
printf("final price: %f",c);
}
else
{
c=price-(price*10)/100;
printf("final price: %f",c);
}
}