#include<stdio.h>
void main()
{
float pdz,pricepermg,nwprice,d,f;
int nomg;
printf("price of dozen");
if(scanf("%f",&pdz)==1)
{
printf("enter the number of mango");
if(scanf("%d",&nomg)==1)
{
pricepermg=pdz/12;
nwprice=pricepermg*nomg;
printf("price= %d\n mango=%o.2f",nomg,nwprice);
}
else
{
printf("enter correct value");
}
}
else
{
printf("Enter the correct value");
}
}
================================OUTPUT===================================
price of dozen :23
enter the number of mango :23
price= 23
mango=44.08
price of dozen :12
enter the number of mango :45
price= 45
mango=45.00