Right Click to Search

Saturday, August 21, 2024

C Program to Add two Numbers Using Function in C Programming


Add Two Numbers By Using Function : [ C Program to Add two Numbers Using Function in C Programming ]
#include<stdio.h>
#include<stdio.h>
#include<conio.h>
 void main()
 {
 int a,b,c;
 printf("\nEnter the two numbers : ");
 scanf("%d %d",&a,&b);
 /* Call Function Sum With Two Parameters */
 c = sum(a,b);
 printf("\nAddition of two number is : ");
 getch();
 }
 int sum ( int num1,int num2)
 {
 int num3;
 num3 = num1 + num2 ;
 return(num3);
 }
Output :
Enter the two numbers : 12 15
Addition of two number is : 27

Tags / Keywords : |

Stumble
Delicious
Technorati
Twitter
Facebook

0 Comments:

Post a Comment

Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email

 

Learn C Programming Copyright © 2010 LKart Theme is Designed by Lasantha, Free Blogger Templates