0% found this document useful (0 votes)
7 views

Installation of Visual Studio

The document provides steps to install Dev C++ and Visual Studio. It includes 5 steps for each installation: selecting language, agreeing to license, selecting components, choosing destination folder, and finishing installation. It then launches the IDE. The document also provides 3 programs in C++ to print shapes and perform basic math operations.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Installation of Visual Studio

The document provides steps to install Dev C++ and Visual Studio. It includes 5 steps for each installation: selecting language, agreeing to license, selecting components, choosing destination folder, and finishing installation. It then launches the IDE. The document also provides 3 programs in C++ to print shapes and perform basic math operations.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Installation of Dev C++

Step 1: The first step while we start the installer is to select the language of our choice as shown
in the below screenshot.

Step 2: Once you select the appropriate language, you have to agree to the license agreement
that pop-ups next.

Step 3: Next, we are asked to select the components that we need to install as a part of the dev-
C++ installation.
Step 4: Now the installer prompts the user for the destination folder where the dev-C++
files/libraries etc. are to be copied.
Step 5: The following screenshot shows the progress of the installation.

Once the installation is over, a “finish” dialog that signals the end of the installation appears. We
click finish and then we can launch the dev-C++ IDE.
Installation of Visual Studio

Step 1: Double-click the .exe file, the Visual Studio installer window will open. Click
"Continue".

Step 2: Downloading and installing the progress bar window will open after clicking
the continue button.
Step 3: After completing the download and installation, then workloads will open.
We need to select what are the workloads we need. Here, we selected ASP.NET and
web development, Azure development.

This workload will install the following packages by default.


Now, you can add or remove any optional package or individual components from
the list.

Step 4: After selecting the desired packages, just click the “Install” button to install.
Step 5: Once the installation is completed. Visual Studio 2022 lunched for the first
time.

Now Visual Studio has been successfully launched. When we open Visual Studio for
the first time, it takes 15-30 seconds for its initial internal setup.
Lab Task # 01
Program # 01: Write a program to print the triangle.

#include<iostream>
using namespace std;
int main()
{
cout << " *" << endl;
cout << " * *" << endl;
cout << " * *" << endl;
cout << " ********" << endl;
}

Output of the program:

Program # 02: Write a program to print the Octagon.

#include<iostream>
using namespace std;
int main()
{
cout << " *******"<< endl;
cout << " * *" << endl;
cout << "* *" << endl;
cout << "* *" << endl;
cout << "* *" << endl;
cout << " * *" << endl;
cout << " *******" << endl;
}

Output of the program:

Program # 03: Write a program to print the Right Isosceles Triangle.

#include<iostream>
using namespace std;
int main()
{
cout << "*" << endl;
cout << "* *" << endl;
cout << "* *" << endl;
cout << "* *" << endl;
cout << "********" << endl;
}

Output of the program:


Lab Task # 02
Program # 01: Write a program to declare a variable takes input from user
and display it.

#include <iostream>
#include<conio.h>
using namespace std;
int main()
{
int a;
cout << "Enter value of a = ";
cin >> a;
cout << "The Value of a is: " << a;
}

Output of the program:

Program # 02: Write a program to declare a variable takes input from user
and display it then increment it by 5 and display the results.
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int a;
cout << "Enter a Value= ";
cin >> a;
cout <<"The value of 'a' is= "<< a << endl;
a = a + 5;
cout <<"The value of 'a' after increment is= "<< a << endl;
}
Output of the program:

Program # 03: Write a program which takes 2 variables having values 10 and
20 add them and print them.
#include <iostream>
using namespace std;

int main()
{
int abc = 10;
int b = 20;
int add = 0;

cout << " abc= " << abc << " b = " << b << endl; // abc =10 b= 20
cout << "add = " << add; // add= garbage value

add = abc + b;

cout << endl << " add = abc + b = " << add;
//cout<< "add = " << add ;

Output of the program:


Lab Task # 03
Program # 1: Multiply 2 numbers

#include<iostream>
using namespace std;
int main()
{ int a,b,multiple;
cout<<"enter the value of a";
cin>>a;
cout<<"enter the value of b";
cin>>b;
multiple=a*b;
cout<<"a*b= "<<multiple;
}
Output:

Program # 2: Add 2 numbers


#include<iostream>
using namespace std;
int main()
{
int a, b, sum;
cout << "enter the value of a: ";
cin >> a;
cout << "enter the value of b: ";
cin >> b;
sum = a + b;
cout << "a+b= " << sum;
}
Output:

Program # 3: Subtract 2 numbers


#include<iostream>
using namespace std;
int main()
{
int a, b, sub;
cout << "enter the value of a: ";
cin >> a;
cout << "enter the value of b: ";
cin >> b;
sub = a - b;
cout << "a-b= " << sub;
}

Output:
Program # 4: Divide 2 numbers

#include<iostream>
using namespace std;
int main()
{
int a, b, div;
cout << "enter the value of a: ";
cin >> a;
cout << "enter the value of b: ";
cin >> b;
div = a / b;
cout << "a/b= " << div;
}
Output:

You might also like