Apr28
FUNCTIONS
=> is a group of statements that together perform a task.
Syntax:
type function_name (parameter list)
* DEFINING and CALLING A FUNCTION *
Implementing any function in addition to main involves two steps:
1. Defining the Function
2. Calling the Function
take this a look:
#include<iostream> using namaspace std; int main() void printMessage(void) |
sample program :
create a program with two subfunctions that performs addition and subtraction.
#include<iostream> using namaspace std; int main() addnum(num1,num2,sum); retur 0; void addnum(int x,int y,int &z) void subnum(int a,int b,int &c) |
Thanks for some quality points there. I am kind of new to online , so I printed this off to put in my file, any better way to go about keeping track of it then printing?