C++ Codes
Algorithms
Algorithm Analysis in C++
Beginners
Code Snippets
Graphics
Data Structures
File Manipulation
Games
Mathematics
Miscellaneous
Visual C++ Library
C++ > Code Snippets sample source codes
Function example
Function example Create your first function in C++ #include
int AddIt(int x,int y) { return (x + y); } int main() { int a,b,c; cout<<"Please enter two integers to add :\n"; //get the two integers cin>>a; cin>>b; //call the AddIt function c = AddIt(a , b); //display the answer cout<<"The answer is : "<
Privacy Policy
|
Link to Us
|
Links