Print Menu

Learn and Trouble Shoot Problems Related to C-Language here.

Print Menu

Unread postby rajeevmahura » Thu May 22, 2008 6:37 pm

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
int ch;
clrscr();
printf("Enter the values");
scanf("%d%d",&a,&b);
printf("\n1.MULTIPLICATION");
printf("\n2.DIVISION");
printf("\n3.ADDITION");
printf("\n4.SUBSTRACTION");
printf("\nEnter your choice");
scanf("%d",&ch);
switch(ch)
{
case 1:
c=a*b;
break;
case 2:
c=a/b;
break;
case 3:
c=a+b;
break;
case 4:
c=a-b;
break;
defult:
printf("Sorry you have type the invalid choice");
}
printf("%d",c);
getch();
}
--Regards--
Rajeev Mahura
Servers & Storage Professional
http://about.me/rajeevmahura
User avatar
rajeevmahura
 
Posts: 144
Joined: Tue May 20, 2008 5:22 pm
Location: Bangalore | New Delhi
Full Name: Rajeev Mahura
Date Of Birth: 15 Jan 1984
Address: New Delhi
Profession: DOEACC Trainer
DOEACC Center: DOEACC DELHI
Mobile No: 0

Return to C-Language

Who is online

Users browsing this forum: No registered users and 1 guest

cron