You are on page 1of 2

Menu driven program is the one in which menu is printed and user select the choice as

per their need.

1.Area of circle

2.Area of rectangle

3.Area of triangle

#include<stdio.h>

#include<conio.h>

void main ()

int ch,r,l,w,b,h;

float area;

clrscr();

printf("enter 1 for area of circle\n");

printf("enter 2 for area of rectangal\n");

printf("enter 3 for area of triagle\n");

printf("enter your choise\n");

scanf("%d",&ch);

switch(ch)

case 1:printf("enter radious of circle\n");

scanf("%d",&r);

area=3.14*r*r;

break;

case 2:printf("enter lanth and width\n");

scanf("%d%d",&l,&w);
area=l*w;

break;

case 3:printf("enter the base and hight\n");

scanf("%d%d",&b,&h);

area=0.5*b*h;

break;

printf("area is=%f",area);

getch();

You might also like