LAB 2
Programming with C++
Main part in C++ program
#include<iostream.h>
void main()
{

          Any code will be written here

}
How to open C++

START
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
 C++:Lab 2
Variables
•   Integer (int).
•   Decimal (float,double).
•   Character (char).
•   Boolean (true / false).
Example1
         Pseudocode                    C++
1. Read length.            • int length,area;
2. area = length*length.     cin>>length;
3. Print area.             • area = length*length;
                           • cout<<“area=“<<area;
Example2


• Write a program to calculate the summation
 of two numbers.

More Related Content

PPTX
C++ lab -4
PPTX
Presentation(intermediate code generation)
PPTX
Exercise6 ch2
PPTX
Three Address code
PDF
Fast coputation of Phi(x) inverse
PPTX
Three address code generation
PDF
A nice 64-bit error in C
PPTX
C++ lab -4
Presentation(intermediate code generation)
Exercise6 ch2
Three Address code
Fast coputation of Phi(x) inverse
Three address code generation
A nice 64-bit error in C

What's hot (20)

PDF
Write declarations for each of the following variables: a. amounts is a...
DOCX
Task python
PPT
Intermediate code generation
PPTX
Lecture 12 intermediate code generation
PPT
Csc1100 lecture10 ch08_pt1
PPT
Code generator
PPTX
Code optimization
PPS
Arithmetic Operations
DOCX
Compilers Final spring 2013 model answer
PPTX
COMPILER DESIGN AND CONSTRUCTION
PPTX
System software
PPTX
Polish Notation In Data Structure
PPS
Aae oop xp_06
PPT
Intermediate code generation
PPTX
Pointers
PPT
Csc1100 lecture12 ch08_pt2
PPT
Chapter 6 intermediate code generation
Write declarations for each of the following variables: a. amounts is a...
Task python
Intermediate code generation
Lecture 12 intermediate code generation
Csc1100 lecture10 ch08_pt1
Code generator
Code optimization
Arithmetic Operations
Compilers Final spring 2013 model answer
COMPILER DESIGN AND CONSTRUCTION
System software
Polish Notation In Data Structure
Aae oop xp_06
Intermediate code generation
Pointers
Csc1100 lecture12 ch08_pt2
Chapter 6 intermediate code generation
Ad

Viewers also liked (10)

PDF
C++ TUTORIAL 6
PPT
Practical basics on c++
PDF
C++ practical lab
PDF
Practical C++ Generative Programming
PDF
c++ lab manual
PDF
Lab manual of C++
DOCX
12th CBSE Practical File
DOCX
C++ project on police station software
DOCX
Computer science project work
C++ TUTORIAL 6
Practical basics on c++
C++ practical lab
Practical C++ Generative Programming
c++ lab manual
Lab manual of C++
12th CBSE Practical File
C++ project on police station software
Computer science project work
Ad

C++:Lab 2

  • 2. Main part in C++ program #include<iostream.h> void main() { Any code will be written here }
  • 3. How to open C++ START
  • 19. Variables • Integer (int). • Decimal (float,double). • Character (char). • Boolean (true / false).
  • 20. Example1 Pseudocode C++ 1. Read length. • int length,area; 2. area = length*length. cin>>length; 3. Print area. • area = length*length; • cout<<“area=“<<area;
  • 21. Example2 • Write a program to calculate the summation of two numbers.