Create a C++ program code using the given flowchart in Visual Studio Code app.
Addition of Two Numbers
Adding two numbers in programming is essentially the same as adding two numbers in general arithmetic. A significant difference is that in programming, you need to pay attention to the data type of the variable that will hold the sum of two numbers.
C++
C++ is a general-purpose hybrid language, which supports both OOPs and procedural language designed and developed by Bjarne Stroustrup. It began in 1979 as “C with Classes” at Bell Labs and first appeared in the year 1985 as C++. It is the superset of C programming language, because it uses most of the C code syntax. Due to its hybrid functionality, it used to develop embedded systems, operating systems, web browser, GUI and video games.
Create a C++ program code using the given flowchart in Visual Studio Code app.
![Start
INPUT
amt
dscnt
tp
age
PROCESS
dscnt = (amt*5)/100
dscnt = (amt* 10)/100
dscnt = (amt*20)/100
dscnt = (amt*25)/100
tp= amt-dscnt
Yes
OUTPUT
if (age >=60)
You'll get 20% discount on total Shopping amount
snrdscnt = (amt*20)/100
No
OUTPUT
Yes
if(amount<=100)
No
OUTPUT
Sorry! No discount for shopping under 100
You've to Pay + amt
OUTPUT
Sorry! No discount for age under 59
OUTPUT
OUTPUT
Yes
No
Yes
Congrats! You'll get 5% discount on total Shopping amount"
if(amount>10e && amount<=200)
else if(amount>200 && amount<=400)
Congrats! You'll get 10% discount on total Shopping amount
No
OUTPUT
No
Yes
OUTPUT
Congrats! You'll get maximum (25%) discount on total Shopping amount
else if(amount>400 && amount<=800)
Congrats! You'll get 20% discount on total Shopping amount"
OUTPUT
You have to pay only + tp
End](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fded9a725-b8cf-4d1a-a873-bf70bb89288a%2F6ae9fae5-2623-41ae-9b1b-3da4b0cb2907%2Fdos3e2_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)