मराठी
महाराष्ट्र राज्य शिक्षण मंडळएचएससी विज्ञान (संगणक विज्ञान) इयत्ता १२ वी

Write C++ program to add two integer numbers by using function call by value. - Computer Science 1

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
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (March) Official
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×