Sunday, 27 November 2011

C++ Program For Print Sum Of 2 Number Using Function


#include<iostream.h>
#include<conio.h>
void main()
 {
   void add();
   clrscr();
   getch();
 }

void add()
 {
   int a,b,sum;
   cout<<"\n enter two numbers";
   cin>>a>>b;
   sum=a+b;
   cout<<"sum="<<sum;
  }

No comments:

Post a Comment