0% found this document useful (0 votes)
9 views2 pages

11 C

Uploaded by

Els Xd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

11 C

Uploaded by

Els Xd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include<stdio.

h>

float add(float c1,float c2)


{
float result;
result=c1+c2;
printf("%f is the addition of numbers",result);
}
float sub(float c1,float c2)
{
float result;
result=c1-c2;
printf("%f is the substraction of numbers",result);
}
float multi(float c1,float c2)
{
float result;
result=c1*c2;
printf("%f is the multiplication of numbers",result);
}
float div(float c1,float c2)
{
float result;
result=c1/c2;
printf("%f is the division of numbers",result);
}

void main()
{
int ch;
float c1,c2;
printf("Enter Two Numbers:");
scanf("%f %f",&c1,&c2);
printf("**************************");
printf("\n1.Addition\n");
printf("\n2.Substraction\n");
printf("\n3.Multiplication\n");
printf("\n4.Division\n");
printf("\nEnter Your Choise\n");
scanf("%d",&ch);
switch(ch)
{
case 1:
add(c1,c2);
break;

case 2:
sub(c1,c2);
break;

case 3:
multi(c1,c2);
break;

case 4:
div(c1,c2);
break;
default:
printf("INVALID CHOISE");
break;
}
}

You might also like