Introduction to C++ Programming Engr. Muniba DCSE UET Peshawar
Contents of Week 02 • Data types, Constants • Floating Point Constants, Size, Memory Concepts • Names, Keywords, Identifiers • Declaration and Definition of Variables • A Simple Program: Printing a Line of Text • Another Simple Program: Adding Two Integers
Introduction to C++ Programming • C++ language – Facilitates structured and disciplined approach to computer program design • Following several examples – Illustrate many important features of C++ – Each analyzed one statement at a time • Structured programming • Object-oriented programming
3
A Simple C++ Example // C++ simple example
C++ style comments
#include //for C++ Input and Output int main () { standard output stream object int number3; stream insertion operator std::cout > number3; int number2, sum;
stream extraction operator standard input stream object
std::cout > number2; sum = number2 + number3; std::cout
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.