




































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





































Outline of the Lecture 05 (^1) C++ 2 Examples (^3) Example 1 (^4) Example 2 (^5) Exercises (^6) References 7 Thanks
C++ Programming Language, ... One of the Most Popular Programming Languages ever Created C++ is widely used in the Software Industry. Systems Software, Application Software, Device Drivers, High Performance Server and client Applications, Embedded Software, Entertainment Software such as Video Games Several Groups Provide both Free and Proprietary C++ compiler software, including the GNU Project, Microsoft, Intel and Borland C++ has Greatly Influenced many other Popular Programming Languages, most notably Java
Examples Adding two Numbers Finding the Maximum of Two Numbers
Adding two Numbers class TwoNums { int x, y; };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); int Sum () {return (x + y);} };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); int Sum () {return (x + y);} int Diff1 () {return (x - y);} };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); int Sum () {return (x + y);} int Diff1 () {return (x - y);} int Diff2 () {return (y - x);} ... ... };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); int Sum () {return (x + y);} int Diff1 () {return (x - y);} int Diff2 () {return (y - x);} ... ... }; void TwoNums::set_values (int a, int b) { x = a; y = b; }
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Adding two Numbers, ... #include