C Program to Addition Of Number Using Function

	#include <stdio.h>
	int add(int a,int b); //function prototype
	void main()
	{
		int x,y,z;
		printf("Enter the value of x and y :");
		scanf("%d%d",&x,&y);
		z=add(x,y); //function calling
		printf("Addition of x and y is : %d",z);
	}
	//function defination
	int add(int a,int b)
	{
		int c;
		c=a+b;
		return c;
	}

Output

	Enter the value of x and y :20 64  
	Addition of x and y is : 84 
Compile and Run Online

Subscribe For Daily Updates