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
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
