Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Saturday, February 19, 2011

C29 : Add two numbers(Using user defined functions)

Back to Home   &  C


//Program to add two numbers using user defined functions.

#include<stdio.h>
#include<conio.h>
add();
void main()
{
clrscr();
getch();
}
int add()
{
int a,b,c;
printf("Enter two numbers\n");
scanf("%d%d",&a,&b);
c=a+b;
printf("addition=%d",c);
return(0);
}
-----------------------------------------------------------
Output
Enter 2 numbers
12
12
Addition=24
===============================================
Back to Home   &  C


No comments: