You are on page 1of 5

Introduction to Computing

Lab 2.1
Topic Cout Statement
Objective Learning how to print data on console.

Lab Task 1 (Easy)


Write a C++ program to print a hollow triangle on console using cout
statement as shown below:
OUTPUT:

Lab Task 2 (Easy)


Write a C++ program to print a filled triangle on console using cout
statement as shown below:
OUTPUT:
Lab Task 3 (Medium)
Write a C++ program to print a hollow hexagonal shape on console using
cout statement as shown below:
OUTPUT:

Lab Task 4 (Medium)


Write a C++ program to print a filled hexagonal shape on console using cout
statement as shown below:
OUTPUT:

Lab Task 5 (Medium)


Write a C++ program to print a hollow square shape on console using cout
statement as shown below:
OUTPUT:
Lab Task 6 (Medium)
Write a C++ program to print a filled square shape on console using cout
statement as shown below:
OUPUT:

Lab Task 7 (Medium)


Write a C++ program to print a hollow diamond shape on console using
cout statement as shown below:
OUTPUT:
Lab Task 8 (Medium)
Write a C++ program to print a filled diamond shape on console using cout
statement as shown below:
OUTPUT:

Lab Task 9 (Hard)


Print Square in the middle of console.
OUTPUT:
Lab Task 10 (Hard)
Print the following shape on console.
OUTPUT:

Lab Task 11 (Hard)


Find the errors in the codes below. Read the errors on console,
understand them, discuss with your instructor and after correcting the code to a
working solution submit its.cpp file along with other programs of this lab on
LMS.
Task-a:

#inlude <iosstream>

using namespace std;

int mian()

Cout<<” Hey Students. Solve me and get your deserved Marks ^_^<<endl;

cout<<”Good Luck!”<<endl;

cout>>”I hope you all are working really hard to achieve best of the results!”
}

You might also like