Professional Documents
Culture Documents
College of Engineering
Computer Engineering Department
Experiment No. 3
Basic Communication through Console
Score
Submitted by:
LastName, FirstName MI.
<Schedule> / <Room>
Submitted to
Engr. Jordan Vhane D. Sardalla
Faculty Member
Date Performed
MM-DD-YYYY
Date Submitted
MM-DD-YYYY
I. Objectives
1. To be familiarized with the basic syntax for input/output of the console.
2. To be able to utilize the said syntax to ask for input and output a response through the
console.
II. Discussion
The basic input device of a modern computer is the keyboard. It is utilized to input
different keys such as numbers, letters of the alphabet, and special characters. The inputted key
will generate a certain signal corresponding to the pressed key and will be further used by the
computer.
A common output device of a modern computer is the monitor. It is utilized to display the
output information from the processed data.
In programming, there are also inputs required from the user and in return the program
will respond with respect to the said input.
III. Instructions
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int age;
cout<<”What is your age? ”;
cin>>age;
cout<<”So you are ”<<age<<” years old.”;
getch();
}
1. The compiler after inputting the code above and saving the file with the correct filename.
2. The initial display of the console after running the program.
3. The console after inputting a number but before pressing the Enter key.
4. The console after pressing the Enter key.
5. The console after pressing the Enter key, re-running the program, and inputting either a letter
or a special character but before pressing the Enter key again.
6. The console after pressing the Enter key.