This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1>E:\programming\visual_studio_2019\Projects\beginningcpp20\chapter5ex7\chapter5ex7\chapter5ex7.cpp(37,32): warning C4244: 'argument': conversion from 'double' to '_Ty', possible loss of data | |
| 1> with | |
| 1> [ | |
| 1> _Ty=unsigned __int64 | |
| 1> ] | |
| 1>E:\programming\visual_studio_2019\Projects\beginningcpp20\chapter5ex7\chapter5ex7\chapter5ex7.cpp(46,33): warning C4244: 'argument': conversion from 'double' to '_Ty', possible loss of data | |
| 1> with | |
| 1> [ | |
| 1> _Ty=unsigned __int64 | |
| 1> ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Osman Zakir | |
| // Beginning C++20: From Novice to Professional by Ivor Horton and Peter Van Weert | |
| // Chapter 5 Exercise 7 | |
| // Exercise Specs: | |
| /** | |
| * Write a program that will read and store an arbitrary sequence of records | |
| * relating to products. each record includes three items of data—an integer product number, | |
| * a quantity, and a unit price. For product number 1001, the quantity is 25 and the unit price is | |
| * $9.95. Because you do not know yet how to create compound types, simply use three different | |
| * array-like sequences to represent these records. The program should output each product |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Osman Zakir | |
| // 11 / 11 / 2021 | |
| // Beginning C++20: From Novice to Professional by Ivor Horton and Peter Van Weert | |
| // Chapter 4 Exercise 8 | |
| // Exercise Specs: | |
| /** | |
| * Create a program that prompts the user to enter an amount of money between | |
| * $0 and $10 (decimal places allowed). Any other value is to be rejected politely. | |
| * Determine how many quarters (25c), dimes (10c), nickels (5c), and pennies | |
| * (1c) are needed to make up that amount. For our non-American readers, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Osman Zakir | |
| // 11 / 7 / 2021 | |
| // Beginning C++20: From Novice to Professional by Ivor Horton and Peter Van Weert | |
| // Chapter 4 Exercise 2 | |
| // Exercise Specs: | |
| /** | |
| * Write another program that prompts for two integers to be entered. This time, | |
| * any negative number or zero is to be rejected. Next, check whether one of the (strictly positive) | |
| * numbers is an exact multiple of the other. For example, 63 is a multiple of 1, 3, 7, 9, 21, or 63. | |
| * Note that the user should be allowed to enter the numbers in any order. That is, it does not |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "author": "Osman Zakir" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef CIRCLE_H | |
| #define CIRCLE_H | |
| #include "Shape.h" | |
| constexpr double pi{ 3.141592653589793238462643383279502884 }; | |
| class Circle : public Shape | |
| { | |
| protected: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef ANIMAL_H | |
| #define ANIMAL_H | |
| #include <string> | |
| #include <string_view> | |
| #include <typeinfo> | |
| class Animal | |
| { | |
| protected: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef ANIMAL_H | |
| #define ANIMAL_H | |
| #include <string> | |
| #include <string_view> | |
| #include <typeinfo> | |
| class Animal | |
| { | |
| private: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef BOX_H | |
| #define BOX_H | |
| #include <iostream> | |
| #include <iomanip> | |
| #include <algorithm> | |
| class Box | |
| { | |
| private: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <link href="styles/style.css"> | |
| </head> | |
| <body> |