100% found this document useful (1 vote)
691 views5 pages

Console Application Visual C++ 2008

The document provides steps to write a program in Visual C++, including loading Visual Studio 2008, creating a new C++ Win32 Console Application project, adding a source file, and entering code to prompt the user for input, perform addition, and output the result. The code takes in two numbers as input, adds them together, and displays the sum.

Uploaded by

Ariel Sumagaysay
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
691 views5 pages

Console Application Visual C++ 2008

The document provides steps to write a program in Visual C++, including loading Visual Studio 2008, creating a new C++ Win32 Console Application project, adding a source file, and entering code to prompt the user for input, perform addition, and output the result. The code takes in two numbers as input, adds them together, and displays the sum.

Uploaded by

Ariel Sumagaysay
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1

How to Write Program in Visual C++


By Ariel T. Sumagaysay, MSCS

1. Load Visual Studio 2008

2. Click – File – New Project


2

3. Select C++ - Win32 Console Application. Enter project


name, and click OK button.

4. Click NEXT button


3

5. Click empty project option, then click FINISH button

6. Select Source Files folder found at the Solution


Explorer of Visual Studio 2008 found at the right side
of the IDE.
4

7. Right – Click Source file folder, select ADD – New


Item.

8. Select C++ File (.cpp), enter Name and click ADD


button.
5

9. Enter the following codes:

#include “stdio.h”
#include “conio.h”
#include <iostream>
using namespace std;
int main()
{
int A,B,C;

cout << "Using the CIN keyword\n\n";


cout << "Enter A Value: ";
cin >> A;
cout << "\n";
cout << "Enter B Value: ";
cin >> B;
cout << "\n";
C = A + B;
cout << "The result of Adding A & B: " << C << endl;
_getch();
return 0;
}

10. Press F5 to build and run your program. (or click


Build – Rebuild,or click Build – Clean, or click –
Compile – F5).

You might also like