program cost_mango implicit none real :: x ! cost per dozen real :: y ! discount integer :: rupees, paise,cost integer :: z ! quantity read*,x,y ,z print*, "cost of one dozen mangoes = ",x, "quantity = ",z if(z>60) then y = y else y = 0.0 end if ! calculation cost = ((x*100/12)*(z)*(1-y)) rupees = cost/100 paise = cost print*, "cost Rs =",rupees, "ps =", paise end program cost_mango
To embed this project on your website, copy the following code and paste it into your website's HTML: