-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00959c4
commit 6fa07a3
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include<iostream> | ||
#include<cmath> | ||
using namespace std; | ||
float avg(float a,float b ) | ||
{ | ||
int result= (a+b)/2; | ||
return result; | ||
} | ||
int add(int a,int b) | ||
{ | ||
int result=a+b; | ||
return result; | ||
|
||
} //function prototype | ||
|
||
string welcom(string name) | ||
{ | ||
return "welcome " + name; | ||
} | ||
int main() | ||
{ | ||
float a; | ||
float b; | ||
cin>>a>>b; | ||
float result=avg(a,b); | ||
int getvalue=add(a,b); | ||
string name="waris"; | ||
string value=welcom(name); | ||
cout<<"The value of Average is:"<<result<<endl; | ||
cout<<"The value of Add function is:"<<getvalue<<endl; | ||
cout<<"The value of welcome function is:"<<value<<endl; | ||
cout<<pow(2,3)<<" the two power three is"<<endl; | ||
|
||
|
||
} |