ITES103 / ITOI103
(Introduction to Programming)
MODULE
2
INTRODUCTION TO C++
LABORATORY EXERCISE 2 - 01
Compiling and Running your Program
NAME OF STUDENT ___________________________________________ DATE ____________
1. Write a program that will display
“Hello [your name]! Welcome to C programming” on the screen
#include <iostream> using namespace std;
void main ()
{
char name; cout<<"hello:"; cout<<"Your name is:"; cin>>name; cin.get(); return 0;
}
| CRITERIA | SCORE | 1 | Implementation of pseudo code | 30 | | 2 | Identification of Input, Process, and Output requirement | 20 | | 3 | Correctness and appropriateness of selected solution | 40 | | 4 | Overall structure and design of the program source code | 10 | | | TOTAL | 100 | |
COMMENTS/REMARKS
Evaluated by / Date
LABORATORY EXERCISE 2 - 02
Console Output and Escape Sequences
NAME OF STUDENT ___________________________________________ DATE ___________
1. Write a program that will display your weekly class schedule in a listed view.
Consider the following output: Monday 7:00-8:50 ITES 103 N05 T805
#include <iostream> using namespace std;
void main (){
cout<<"\nMonday:"; cout<<"9:00-10:50\tITEF103\tR05\tT805:"; cout<<"\nTuesday:"; cout<<"7:00-8:50\tMATI103\tW02\tT602\n9:00-10:50\tITEI103\tW01\tT609\n11:00-1:00\tNOONBREAK\n1:00-2:50\tPEDU103\tR01\tT901\n3:00-4:50\tFILI103\tR06\tT604:"; cout<<"\nWednesday:"; cout<<"3:00-4:50\tECON103\tH305\tM205\n5:00-6:50\tECON103\tH305\tM205:"; cout<<"\nThursday:"; cout<<"9:00-10:50\tITEF103\tR05\tT606:"; cout<<"\nFriday:"; cout<<"7:00-8:50\tMATI103\tW02\tT602\n9:00-10:50\tITEI103\tW01\tT601\n11:00-1:00\tNOONBREAK\n1:00-2:50\tPEDU103\tR01\tT901\n3:00-4:50\tFILI103\tR06\tT604:"; system("pause>0");
}
2.