CLICK HERE FOR BLOGGER TEMPLATES AND MYSPACE LAYOUTS »

Tuesday, February 17, 2009


#include
#include


void main(){
clrscr();
int choice,a,b,n,y,sum=0,sub=0,mul=0,div=0;

printf("W E L C O M E ! ! !");
printf("\nSelect operation you like to Try!");
printf("\n\t[A] for ADDITION");
printf("\n\t[B] for SUBTRACTION");
printf("\n\t[C] for MULTIPLICATION");
printf("\n\t[D] for DIVISION");
printf("\n\t[E] for Exit");
printf("\nEnter your choice operation here:");
scanf("%s",&choice);
switch(choice)
{
case 'A':
printf("Enter number:");
scanf("%d",&a);
printf("Enter another number:");
scanf("%d",&b);
sum=a+b;
printf("Sum of two numbe is: %d",sum);
printf("\tNICE ONE!!!!!!!!!!");
break;
}
switch(choice)
{
case 'B':
printf("Enter number:");
scanf("%d",&a);
printf("Enter another number:");
scanf("%d",&b);
sub=a-b;
printf("Sub of two numbe is: %d",sub);
printf("\tNICE ONE!!!!!!!!!!");
break;
}
switch(choice)
{
case 'C':
printf("Enter number:");
scanf("%d",&a);
printf("Enter another number:");
scanf("%d",&b);
mul=a*b;
printf("Mul of two numbe is: %d",mul);
printf("\tNICE ONE!!!!!!!!!!");
break;
}
switch(choice)
{
case 'D':
printf("Enter number:");
scanf("%d",&a);
printf("Enter another number:");
scanf("%d",&b);
div=a/b;
printf("Div of two numbe is: %d",div);
printf("\tNICE ONE!!!!!!!!!!");
break;
}
switch(choice)
{
case'E':
printf("\n\nEnd of the program,Thankyou very much!!!! hahahahahah....");
}
getch();
}

0 comments: