View
628
Download
3
Category
Preview:
Citation preview
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).
Recommended