Itc Lab Report: Ojective
Itc Lab Report: Ojective
EXPERIMENT NO : 8
Ojective:
Introduction:
C++ is widely used among the programmers or
developers and the engineers. It contains the important parts
including variable, data types, etc. It is very useful for writing our
own program by creating our own logics and its used in all types of
things like games , applications, operating systems etc.It is very
helpful for us.
Procedure:
In C++, a function is a group of statements that is given a name, and which can
be called from some point of the program. The most common syntax to define a
function is:
Where:
- type is the type of the value returned by the function.
- name is the identifier by which the function can be called.
- parameters (as many as needed): Each parameter consists of a type followed
by an identifier, with each parameter being separated from the next by a
comma. Each parameter looks very much like a regular variable declaration
(for example: int x), and in fact acts within the function as a regular variable
which is local to the function. The purpose of parameters is to allow passing
arguments to the function from the location where it is called from.
- statements is the function's body. It is a block of statements surrounded by
braces { } that specify what the function actually does.
Issues:
I have faced the issue that i did not that how to get the
value in updated form, then i use the refrence(&) iin this way i
solved my issue.
Conclusion:
Applications:
#include <cmath>
int n1,n2,n3,n4,n5;
cin>>n1>>n2>>n3>>n4>>n5;
mean=n1+n2+n3+n4+n5/5;
int main()
double mean;
double stdv;
function(mean,stdv);
return 0;
OUTPUT: