Uploaded by Muhammad Nur Aziim

Tutorial 1 Chapter 1

advertisement
INTRODUCTION TO PROGRAMMING
TUTORIAL
a) Rewrite back the programming code below and identify what will the programs
print on the screen?
b) Write a C++ program that will produce an output of the following text on your
command
Prompt screen.
Hint : Use the endl keyword where appropriate
sbi|UNIKL MIMET
PAGE 2
c) The following program contains several errors. Resolve the errors and run
The program to test your changes. Copy and paste your output
#include<iostream>
using namespace std;
int main ()
{
cout<<"If you can appear this text:
cout>>"on your display';
cout<<"you can"
cout<<"save all your works and send it to me<<endl
return;
d) Hint: Use a single cout and insert \t and \n.
e) Type a code that can displays the following patterns .Hint: Use a single cout and
insert \t and \n.
sbi|UNIKL MIMET
PAGE 2
Download