Lets have fun with the concepts and coding of programs in C/C++ and Java.
Wednesday, 2 November 2011
No Argument but Returning type function
#include<stdio.h> #include<conio.h> int add(); void main() { int m; clrscr(); m=add(); printf("The sum is : %d",m); getch(); } int add() { int a,b,s=0; printf("Enter the number: "); scanf("%d %d",&a,&b); s=a+b; return s; }
No comments:
Post a Comment