Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int x=5,y=5,add,divide,sub;
- int addsum()
- {
- add = x+y;
- return add;
- }
- int diviesum()
- {
- divide = x/y;
- return divide;
- }
- int subsum()
- {
- sub = x-y;
- return sub;
- }
- int main()
- {
- int fun;
- printf("Hello User Enter 1 For Add or 2 Divie or Sub\n");
- scanf("%d",&fun);
- switch(fun)
- {
- case 1:
- printf("Your Add Is = %d\n",addsum());
- break;
- case 2:
- printf("Your Add Is = %d\n",diviesum());
- break;
- case 3:
- printf("Your Add Is = %d\n",subsum());
- break;
- default :
- printf(" Your Input Is Wrong !");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement