I have to details about a property's lenght, width, whether its approved by government or not then its cost and estimated cost after adding 10% tax. The output doesn't give me the option to select a property type.
#include <stdio.h>
#include <stdbool.h>
int main()
{
char l, f, pte;
float length ,breadth,property_cost;
float cost_per_squarefeet;
bool approved_by_govt_OR_NOT;
printf("enter the length\n");
scanf("%f" ,&length);
printf("enter the breadth\n");
scanf("%f" ,&breadth);
printf("enter the cost per squarefeet\n");
scanf("%f" ,&cost_per_squarefeet);
printf("enter property type\n");
if(pte=='1')
{
printf("property type is land\n");
}
else if(pte=='f')
{
printf("property type is flat\n");
}
else
{
printf("property type is house\n");
}
property_cost =(length*breadth*cost_per_squarefeet) * (10/100.0);
printf("property cost is %f" ,property_cost);
return(0);
}