#include<stdio.h>
#include<conio.h>
void addition(void);
void subtraction(void);
void multiply(void);
void divition(void);
void main()
{
char name;
clrscr();
printf("\tpress A for Addition.\n\n");
printf("\tpress S for Subtraction.\n\n");
printf("\tpress M for Multiply.\n\n");
printf("\tpress D for Divition.\n\n\t");
name=getchar();
switch(name)
{
case 'A':
addition();
break;
case 'a':
addition();
break;
case 'S':
subtraction();
break;
case 's':
subtraction();
break;
case 'M':
multiply();
break;
case 'm':
multiply();
break;
case 'D':
divition();
break;
case 'd':
divition();
break;
default:
printf("\tplease re-enter your choise.\n\n");
printf("\tThank you for chosing u & i softwere.\n\n\tCreated By Dixit Panchal.\n\n\tpress any key to continues\n");
break;
}
getch();
}
void addition(void)
{
int i,u,ans;
printf("\tplease enter your two value which you want to Addtion.\n\n\t");
scanf("%d\t%d",&i,&u);
ans=i+u;
printf("\tYour answer is = %d",ans);
}
void subtraction(void)
{
int u,i,ans;
printf("\tplease enter your two value which you want to Subtraction.\n\n\t");
scanf("%d\t%d",&u,&i);
ans=u-i;
printf("\tYour answer is = %d",ans);
}
void multiply(void)
{
int u,i,ans;
printf("\tplease enter your value which you want to Multiply.\n\n\t");
scanf("%d\t%d",&u,&i);
ans=u*i;
printf("\tYour ans is = %d",ans);
}
void divition(void)
{
int u,i,ans;
printf("\tplease enter your value which you want to Divition.\n\n\t");
scanf("%d\t%d",&u,&i);
ans=u/i;
printf("\tYour answer is = %d",ans);
}
#include<conio.h>
void addition(void);
void subtraction(void);
void multiply(void);
void divition(void);
void main()
{
char name;
clrscr();
printf("\tpress A for Addition.\n\n");
printf("\tpress S for Subtraction.\n\n");
printf("\tpress M for Multiply.\n\n");
printf("\tpress D for Divition.\n\n\t");
name=getchar();
switch(name)
{
case 'A':
addition();
break;
case 'a':
addition();
break;
case 'S':
subtraction();
break;
case 's':
subtraction();
break;
case 'M':
multiply();
break;
case 'm':
multiply();
break;
case 'D':
divition();
break;
case 'd':
divition();
break;
default:
printf("\tplease re-enter your choise.\n\n");
printf("\tThank you for chosing u & i softwere.\n\n\tCreated By Dixit Panchal.\n\n\tpress any key to continues\n");
break;
}
getch();
}
void addition(void)
{
int i,u,ans;
printf("\tplease enter your two value which you want to Addtion.\n\n\t");
scanf("%d\t%d",&i,&u);
ans=i+u;
printf("\tYour answer is = %d",ans);
}
void subtraction(void)
{
int u,i,ans;
printf("\tplease enter your two value which you want to Subtraction.\n\n\t");
scanf("%d\t%d",&u,&i);
ans=u-i;
printf("\tYour answer is = %d",ans);
}
void multiply(void)
{
int u,i,ans;
printf("\tplease enter your value which you want to Multiply.\n\n\t");
scanf("%d\t%d",&u,&i);
ans=u*i;
printf("\tYour ans is = %d",ans);
}
void divition(void)
{
int u,i,ans;
printf("\tplease enter your value which you want to Divition.\n\n\t");
scanf("%d\t%d",&u,&i);
ans=u/i;
printf("\tYour answer is = %d",ans);
}
No comments:
Post a Comment