Intensive Programming Lab
Lab 2: The Programming Environment
Learning Objectives:
The objectives of this first experiment are to make you more familiar with the Windows
programming environment and the "C++" compiler. For this purpose you will use
DevCPP/Microsoft Visual Studio. You will write, compile and run a program in "C++".
Example:
Write a C++ program that displays “Welcome to C++ Programming”.
Code:
#include<iostream>
using namespace std;
/* function main begins program execution */
int main()
{
cout<<"Welcome to C++ Programming";
return 0; /* indicate that program ended successfully */
} /* end function main */
Task 1: Write a C++ program that displays following output:
Welcome to
C++ Programming
Task 2: Write a C++ program that prints following shapes/patterns using cout statement:
(1) (2) (3) (4) (5) (6)
* ********** * * ***** *****
*** * * ** ** **** ****
***** * * *** *** *** ***
*** * * **** **** ** **
* ********** ***** ***** * *