Computer Science, asked by neha9293, 5 months ago

Write a menu driven program in python for area of triangle

Answers

Answered by riyashrivastava28
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