WAP for addition,subtraction,multiplication,division & mod using 5 different functions. Get link Facebook X Pinterest Email Other Apps - March 22, 2017 Get link Facebook X Pinterest Email Other Apps Comments Unknown9:45 PM#includevoid shashi1();void shashi2();void shashi3();void shashi4();void shashi5();void main(){ shashi1(); shashi2(); shashi3(); shashi4(); shashi5();}void shashi1(){ int a,b,c; printf("enter value\n"); scanf("%d%d",&a,&b); c=a+b; printf("addition is%d\n",c);}void shashi2(){int a,b,c; printf("enter value\n"); scanf("%d%d",&a,&b); c=a-b; printf("substraction is%d\n",c);}void shashi3(){ int a,b,c; printf("enter value\n"); scanf("%d%d",&a,&b); c=a*b; printf("multiplication is%d\n",c);}void shashi4(){ int a,b;float c; printf("enter value\n"); scanf("%d%d",&a,&b); c=a/b; printf("division is%f\n",c);}void shashi5(){int a,b,c;printf("enter value\n");scanf("%d%d",&a,&b);c=a%b;printf("mod is %d\n",c);ReplyDeleteRepliesReplyUnknown9:45 PMThis comment has been removed by the author.ReplyDeleteRepliesReplyAdd commentLoad more... Post a Comment
#include
ReplyDeletevoid shashi1();
void shashi2();
void shashi3();
void shashi4();
void shashi5();
void main()
{
shashi1();
shashi2();
shashi3();
shashi4();
shashi5();
}
void shashi1()
{
int a,b,c;
printf("enter value\n");
scanf("%d%d",&a,&b);
c=a+b;
printf("addition is%d\n",c);
}
void shashi2()
{
int a,b,c;
printf("enter value\n");
scanf("%d%d",&a,&b);
c=a-b;
printf("substraction is%d\n",c);
}
void shashi3()
{
int a,b,c;
printf("enter value\n");
scanf("%d%d",&a,&b);
c=a*b;
printf("multiplication is%d\n",c);
}
void shashi4()
{
int a,b;
float c;
printf("enter value\n");
scanf("%d%d",&a,&b);
c=a/b;
printf("division is%f\n",c);
}
void shashi5()
{
int a,b,c;
printf("enter value\n");
scanf("%d%d",&a,&b);
c=a%b;
printf("mod is %d\n",c);
This comment has been removed by the author.
ReplyDelete