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

FACULTY OF COMPUTER SCIENCE AND ENGINEERING

Time: 3 hrs CS 101 Lab


Marks: 10

Section G Lab No: 06 Dated:


11/10/2016

Lab activity 1 :
Design a C++ program that displays the multiplication table using for
loop in the format given below:

e.g. 2*1=2
2*2=4
2 * 3 = 6 . So on

You have to take three inputs from the user i.e. table number, table
starting point and table ending point.

Lab activity 2 :
Design a C++ program, which displays the following pattern using
nested for loop structure.

6 5 4321
5 4 321
4 3 21
3 2 1
2 1
1

Note: Take number of rows you want to print as an input from the user
e.g. n=6 for above pattern.

Lab activity 3 :
Design a C++ program, which displays the following pattern of
asterisks using nested for loop structure.
*
**
***
****
*****
******
*******
********
*********
*********
********
*******
******
*****
****
***
**
*

Note: Your program can use only two output statements, one of each of the
following forms:

cout << "*";


cout << endl;

You might also like