• Write a program to Compute the railway fare depending on the criteria as given below:
    Fare depending on the criteria as given below:
    Age (in years) Distance (in Kms) Fare (in Rupees)
    Below 10
    Below 10 Rs. 5
    Between 10 and 50 Rs. 20
    Above 50 Rs. 50
    Between 10 and 60
    Below 10 Rs. 10
    Between 10 and 50 Rs. 40
    Above 50 Rs. 80
    Above 60
    Below 10 Rs. 4
    Between 10 and 50 Rs. 15
    Above 50 Rs. 35
    • Enter your age: Below 10 Btw. 10 & 60 Above 60
    • Enter the distance to travel: Below 10 Btw. 10 & 50 Above 50
    • Enter the number of people:
    • Total Railway Fare:
    • home

    • Solution

      Solution

    • IF-ELSE JS