Sunteți pe pagina 1din 7

Presentation Assignment:

1.Programming C++
a. Create 2 simple Mathematic operator function using C++ programming
language software.
1. The first programming Mathematic operator that I created using C++
programming is How to calculate Area of Square.
i) To do that first create the programming language in the C++ programming
about How to calculate the Area of Square like the sample picture below.

ii) After finish write the program code in the C++, click F9 to compile the program.

iii) To see the program you write is the success, when you compile the message
log will appear says that the program you write is a success.

iv) After successfully compile the program, click F11 to run the program like the
sample pictures below.

2. The second program that I create using the C++ programming is How to Find
Area of Triangle.
i)First,you must write the program in the software C++ programming like the
sample picture below.

ii)Secondly, you must compile byclick F9 the program after finish write the
program in the C++

Iii) The message log will appear to tell you that the program you write is a success
if you write the program correctly.

iv) Finally, click F11 to run the program like the sample picture below. After
compile the program.

b) Explain program C++ that you create(operation)


The operation that I use in this C++ programming is below:
1. #include(iostream)
Tells the preprocessor to include the iostream standard file. This specific file
(iostream) includes the declaration of the basic standard input-output library in
C++ programs that use the standard library, and in fact it will be included in most
of the source codes include in these tutorials.

2. using namespace std;


All the elements of the standard C++ library are declared within what is called a
namespace, the namespace with the name std. So in order to access its
functionality we declare with this expression that we will be using these entities.
This line is very frequent in C++ programs that use the standard library, and in fact
it will be included in most of the source codes included in these tutorials.

3. int main ()
This line corresponds to the beginning of the definition of the main fuction. The
main function is the point by where all C++ programs start their execution,
Independently of its location within the source code.It does not matter whether
there are other functionss definition will always be the first one to be executed in
any C++ program.
4. cout <<
Represents the standard output stream in C++,and the meaning of the entire
statement is to insert a sequence of characters.
5. Return 0;
The return statement cause the main function to finish.

c) Give your answer step by step how to run that run the program.
1. To run the program you must write a program in the software C++
programming like the sample picture below.

2. After finish write the program, you must compile the program by clicking F9 like
the sample picture below.

3. To see the program you write is a success or not,the message log will appear to
tell you the program you write is a success.

4. Finally, click F11 to run the program after you compile it.

S-ar putea să vă placă și