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
Computer Science,
2 months ago
Science,
2 months ago
Computer Science,
2 months ago
Biology,
5 months ago
Math,
5 months ago
Math,
10 months ago
Geography,
10 months ago