Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Reg.

No: _________________ Date: ______________

CSCL 1103 Lab: Fundamentals of Programming


(BSSE-1A )

Learning Objectives:

The objective of this first experiment is:

1. To make you familiar with the Windows programming environment and the "C++" compiler. For
this purpose you can use DevCPP/Visual Studio/CodeBlocks/Turbo C (TC). You will write,
compile and run programme in "C++"

Your lab report is expected to contain the following for each exercise:

 C++ Source Code with proper comments.


 At the top of your C++ source code also write the following comments
o /* this programme is prepared by XXXXXXXXXXX on dd/mm/yyyy. This programme
……….(a bit of explanation what your programme does.*/

Exercise 1: Print following shape using simple cout statements

(1) (2) (3) (4) (5) (6)

* ********** * * * * *********
*** * * ** ** * * *********
***** * * *** *** * *********
*** * * **** **** * * *********
* ********** ***** ***** * * *********

Exercise 2: Assume you have 3 integer variables in your program with names a, b and c. Write C++ code
for following tasks.
1. Declare and initialize each variable in a separate statement.
2. Declare each variable in separate statement, then initialize each variable separate
statement.
3. Declare all variables in one statement. Then, initialize each variable in separate
statement.
4. Declare and initialize all variables in a single statement.
5. Only declare variables a, b and declare/initialize variable c in a single statement.

Due Date: Wed, 18 Sep Lab

Page 1 of 1

You might also like