INPUT
/ OUTPUT
the cornerstone of the theory
Iostream library is the
library/libraries that are frequently used in C++. Programs that use iostream
library must include (include) files iostream. h.
Iostream library
provides a number of operations to handle read and write the types of the data
book. Iostream library is an object-based library that provides the functions
of input and output using streams.
Stream is an abstraction
that represents the media used in the operation of input and output operations.
A stream is basically can be represented as a source or destination of
characters with an unlimited length. Stream, can be associated with a physical
device be the source or destination of the characters, such as disk, keyboard,
or display monitor so that characters that are retrieved or written from/to the
abstraction called stream, physically is the output/input from/to physical
devices.
For example, the
filestream object is a C++ object to manipulate and interact with the file.
When a file stream is used to open the file, then opreasi-output/input
operation on the stream is physically visible on that file. At the lowest
level, a file is interpreted as a line or a stream of bytes. At this level the
concept of data type does not exist. While at user-level, a file consists of a
sequence of data from one or more types of characters, numeric values, and
class objects.
Statement/command output/output statement is used to display the
data to the output device, e.g. a monitor screen. The argument can be either a
string or a variable that has been declared. The command used is cout. Output
operations performed by the operator or operator leftshift insertion
(<<). The syntax that is used in the output of the command is:
|
Statement/command or enter/input statement is used to memasukkkan
an terrentu variables into the price of input devices, such as keyboard.
Printah used was cin. Input operations performed by the operator or operator
rightshift extraction (>>). The syntax used to enter commands is as
follows:
|
III. THE EXPERIMENT
v
Output used
stream :
Salam
Program III.1
|
Results
Program III.1

Program III.2
|
Results
Program III.2

1) results in Program 1
and Program III. III. 2 produces the same result in other words then the
function << and function endl \n has the same functionality
2) function endl is to
place the character in a new line.
3) Program to use cout
to display text that is similar to the Program 1.2 On Practical i. name the
Program III. 3
Program III.3
|
Results
Program III.3

v
Input string use
stream :
Nama
Program III.4
|
Hasil Program III.4

4) 4) Comparison between programs III. 4 with a
similar program on practical-II Program II. 1 generate results running the
same.
5) 5 Cin) replaces gets while the cout Replace
printf.
v
Program input to
variable number :
Menghitung akar Prgram III.5
Program III.5
|
6) 6) to generate the unit function cin while the
scanf menghasilhan a fractional value.
7) 7) in rapid succession a variable into a real
number, there needs to be change as follows:
|
|
to
Results
compile Program III.5

Results
compile change variable “a”

v
Program with
other input : Menghitung Rerata
Program III.6
|
8) 8) error on program occurs in the function cin
using operator insertion operator or liftshift (<<) should use rightshift
Operator or carrier extraction (>>)
9) 9) the correct Program i.e.
|
|
Results
Program III.6 that
right

v
Program combine
input-output : Data diri
|
Results
running Program combine
input-output : Data diri

I.
KESIMPULAN
As for the inferences
that can be drawn in this lab course III, among others:
1. in carrying out the
actual C++ Program is very easy and very easily, it's just that it takes
patience and thoroughness when an error occurred (Error) when mengkompile data
that we run,
2. the iostream Library
the library is often used in C++ programs running, which provides a number of
operations to handle read and write types data book,
3. Orders/cout function
that outputs/output command is used to display the data to the output device,
such as monitor, conducted by operators leftshift operator or insertion
(<<), whereas command/function cin, input/input command is used to insert
a price into a certain veriabel of input devices, such as keyboards, which are
dioprasikan by the operator or operator rightshift extraction (>>).
II.
REFERENSI
ü Modul Praktikum Dasar Pemrograman Kartika Firdausy,
S.T.,M.T
ü blog.binadarma.ac.id/yantox_ska/
ü lecturer.eepis-its.edu/~tessy/lecturenotes/
ü ilmukomputer.com
