C++ : Function call by value
Today i am going to share a simple function program with you i hope you will like this .
#include<iostream>
using namespace std;
int add(int , int );
int main()
{
int a , b , c;
cout<<"Enter values \n";
cin>>a>>b;
c = add(a , b);
cout<<"sum : "<<c;
c = add(a , b);
cout<<"add ="<<c;
}
int add(int x , int y)
{
int sum = x + y;
return sum;
}
Output :
Enter values
3
5
sum : 3 + 5 = 8

good work @wajahatsardar
thanks : can you under stand programming language ???
No, I have not learned them, but have made their cows
That,s good i followed you
thank you
This post has received a 3.83 % upvote from @boomerang thanks to: @wajahatsardar
@boomerang distributes 100% of the SBD and up to 80% of the Curation Rewards to STEEM POWER Delegators. If you want to bid for votes or want to delegate SP please read the @boomerang whitepaper.