LAB - 03 Bscs Fall 2018 Section - I: Introduction To Computing

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

INTRODUCTION TO COMPUTING

LAB – 03
BSCS FALL 2018
SECTION – I

TOPIC: FUNCTIONS
COURSE INSTRUCTOR: SHAISTA SIDDIQUE

Faculty of Information Technology


University of Central Punjab
File and Folder Formatting:

1. Create a folder for the lab (e.g. LAB-3, LAB03, LAB_3 etc.)

2. Create a cpp file after the task name along with lab number (e.g. lab3_task1.cpp,
lab3_task2.cpp etc.)

3. All the new cpp files created must be in the separate folders, create folder for each
separate tasks).

4. Create separate cpp file for each tasks, i.e. the number of cpp files must be equal to the
number of tasks in lab.

LAB TASKS

TASK – 01
Write a C++ code that prints your name covered in Asterisks, the code must be written in main
body. Your output should match the example given below.

TASK – 02
Write a C++ code that prints the same output as Task – 01, the line of asterisks should be
printed by using a function. Only name should be printed in main body whereas the function
would print the line of asterisks.

TASK – 03
Write a C++ code that prints a Square of asterisks by only calling PrintAsterisksLine functions n
number of times (where n is the length of square).

TASK – 04
Write a C++ code where only PrintSquare function is called in main body and PrintSquare
function calls PrintAsterisksLine n number of times (where n is the length of square)

TASK – 05
Write a C++ code that prints a hollow square of asterisks by using a PrintHollowSquare
Function where two separate functions are called (i.e. PrintAsterisksLine &
PrintHollowAsterisksLine).

TASK – 06
Write a C++ code that prints a Triangle by calling a function PrintTriangle

TASK – 07

Write a C++ code that prints a Hollow Triangle by calling a PrintHollowTriangle Function

FILE SUMBISSION INSTRUCTION:

1. Submit all the .cpp files on www.foitlms.ucp.edu.pk.

You might also like