You are on page 1of 7

ASSIGNMENT PROGRAMMING C++

A. Create 2 simple mathematics operators function using C++ Programming language software.
i.
BAHAGI

NURUL NADRAH BINTI SHARIDAN

ii.

TAMBAH

NURUL NADRAH BINTI SHARIDAN

B. Explain program C++ that you create (operation).

i.
-

ii.
-

iii.
-

Iostream.h
Usually the compiler inserts the contents of a header file called iostream into the program. Where it puts it
depends on the system. The location of such files may be described in your compiler's documentation. A
list of standard C++ header files is in the standrat headers reference.

#include
Beginning with a hash sign (#) are directives for the preprocessor. They are not regular code lines
with expressions but indications for the compiler's preprocessor. In this case the directive
#include

\n
\n is the newline character , when the newline character is output to the console breaks a
newline .

NURUL NADRAH BINTI SHARIDAN

C.

Give your answer step by step how to run that program

1)

Click strat and then clik C++ to open programmineng C++

2) Then you you click file , then you choose new , and then you click projek.

3) Then you choose console application

NURUL NADRAH BINTI SHARIDAN

4) Then you write the program like in this picture

5) Then run the projek


6) Then you save the projek

NURUL NADRAH BINTI SHARIDAN

7) Then you compile the projek

8) Then Exucute the projek

NURUL NADRAH BINTI SHARIDAN

9) Then you insert the data then the result will come out like this

NURUL NADRAH BINTI SHARIDAN

You might also like