Twitter Feed Facebook Google Plus Youtube

Adsense responsive

Recent Post below header

Tuesday, 5 February 2013

C PROGRAM: TO ADD TWO NUMBERS USING FUNCTION

CODING:
#include<stdio.h>
#include<conio.h>
main()
{
int sum(int,int),num1,num2,add;
clrscr();
printf("Enter first number: ");
scanf("%d",&num1);
printf("Enter second number: ");
scanf("%d",&num2);
add=sum(num1,num2);
printf("\n\nSum of %d and %d is= %d",num1,num2,add);
getch();
}
int sum(int n1,int n2)
{
return(n1+n2);
}


CODING

OUTPUT

For any query or suggestion please comment below...

No comments:

Post a comment