Advertisements
Advertisements
प्रश्न
Write C++ program to add two integer numbers by using function call by value.
कोड लेखन
Advertisements
उत्तर
#include<iostream.h>
#include<conio.h>
int add(int a, int b);
int main()
{
int x, y, ans;
cout<<"Enter two numbers";
cin>>x>>y;
ans=add(x,y);
cout<<"Addition="<<ans;
getch();
return 0;
}
int add(int a, int b)
{
return a+b;
}shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
