Sunday, March 26, 2017

Add sub and multiplication example in c with function 3

#include<stdio.h>

void add(int x ,int b,char letter)
{

    printf("summation=%d \n",x+b);

}

void sub(int x,int y)
{
    printf("subtraction=%d \n",x-y);

}

multi(int p,int q,float r)
{


    printf("multiplication=%f \n",p*q*r);

}

void main()
{

    printf("We R in main function \n");
    int a,b;
    printf("Enter 2 value \n");
    scanf("%d%d",&a,&b);
    add(a,b,'A'); ///parameter = pass by value
    sub(a,b);
    multi(a,b,8.5);


}






No comments:

Post a Comment