Algorithm
Step 1: StartStep 2: Input base and height
Step 3: Average=0.5*base*height
Step 4: Print Average
Step 5: End
Flowchart
C-Program
#includeint main()
{
float base,height,area;
printf("Enter base and height:");
scanf("%f%f",&base,&height);
area=0.5*base*height;
printf("Area is:%f",area);
getch();
}
0 Comments