Friday, 10 January 2014

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

1 comment:

  1. Slot Machine Free Spins No Deposit - Casino Roll
    Slot Machine Free Spins 실시간 배팅 사이트 No Deposit from Casino Roll has you covered with 해외축구스코어 an amazing No Deposit Bonus of 스포티비365 $5,500. 슬롯 꽁 머니 This free spins slot 강원 랜드 여자 노숙자 game will give

    ReplyDelete