Write a menu driven program in python for area of triangle
Answers
Answered by
1
Answer:
#include <stdio.h>
void main ()
{
int choice,r,l,w,b,h;
float area;
printf("Input 1 for area of triangle\n");
printf("Input your choice : ");
scanf("%d",&choice);
switch(choice)
{
;
case 1:
printf("Input the base and hight of the triangle :");
scanf("%d%d",&b,&h);
area=.5*b*h;
break;
}
printf("The area is : %f\n",area);
}
Similar questions