Header Ad

C program to perform multiplication and division of number using return value of function

In this tutorial, we are going to write a C program to perform multiplication and division of numbers with the return value of the function in C Programming with practical program code and step-by-step full complete explanation.

C program to perform multiplication and division of number using return value of function


C program to perform multiplication and division of numbers using the return value of the function.

 
#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
    int input(int);
    int sqr(int);
    int x;

    clrscr();

    x=sqr(5*input(x)/2);

    printf("Square=%d",x);
}

int input(int k)
{
    printf("Enter value of x=");
    scanf("%d",&k);
    return(k);
}

int sqr(int m)
{
    return(pow(m,2));
}


Output

 
Enter value of x=5
Square=144


Post a Comment

0 Comments