SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to calculate x(y+z) by using user defined function
C program to calculate x(y+z) by using user defined function
Output:
Enter the values x,y,z to calculate x(y+z):
1 2 3
Result = 5
Implementation:
#include
int findexpression(int x,int y,int z,int *result) { *result = x * (y + z); } int main(void) { int x,y,z,result; printf("Enter the values x,y,z to calcualte x(y+z):\n"); scanf("%d %d %d",&x,&y,&z); findexpression(x,y,z,&result); printf("Result = %d\n",result); return 0; }
PREVIOUS
NEXT
HOME