Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Computer Science/ Borland C++ 5.

02
Install Borland C++ 5.02 to your computer First how to open the DOS(standard) to write a C++ program
File New Project ok Target Name: Your name Platform DOS(Standard)ok

Double click on Your name or (proj0023.cpp[.cpp])

Dr.Selar

by:ARAMCS

Computer Science/ Borland C++ 5.02


Lesson 01

#include <iostream.h> #include <conio.h> int L,W,area; main() { cout<<"Please insert two numbers:\n"; cout<<L=; cin>>L; cout<<W=; cin>>W; area=L*W; cout<<"area="<<area; getch(); }
Please insert two numbers: L=4 W=5 area=20

Dr.Selar

by:ARAMCS

Computer Science/ Borland C++ 5.02


Lesson 02: Swap

#include <iostream.h> #include <conio.h> int a,b,c; main() { cout<<"Please insert two numbers:\n"; cin>>a>>b; cout<<"a="<<a<<" b="<<b; c=b; b=a; a=c; cout<<"\nYour Swap is:\n"; cout<<"a="<<a<<" b="<<b; getch(); }
Please insert two numbers: 3 4 a=3 b=4 your swap is: a=4 b=3

Dr.Selar

by:ARAMCS

You might also like