0% found this document useful (0 votes)
126 views5 pages

Introduction To Computing: Lab Task 1 (Easy)

This document outlines 11 lab tasks for learning to use cout statements in C++ to print various shapes to the console. The tasks start with printing basic shapes like triangles and progress to more complex shapes like hollow squares and diamonds. The final task involves finding and correcting errors in a sample code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views5 pages

Introduction To Computing: Lab Task 1 (Easy)

This document outlines 11 lab tasks for learning to use cout statements in C++ to print various shapes to the console. The tasks start with printing basic shapes like triangles and progress to more complex shapes like hollow squares and diamonds. The final task involves finding and correcting errors in a sample code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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