Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ex. 1- Simple I/O in C++ Write a short C++ program which prompts the user for the current year, the user's current age, and another

image text in transcribed

Ex. 1- Simple I/O in C++ Write a short C++ program which prompts the user for the current year, the user's current age, and another year. The program should calculate the age that the user was or will be in the second year entered Input: three lines, the current year on the first, the current age on the second, and the other year on the third Output: one line showing the calculated age PART 2 Write a short C++ program which displays a menu for the user to choose between converting US dollars into Chinese RMB and Chinese RMB into US dollars. The user inputs the amount and the precision, then the program display the corresponding result. Note: use 1.00 USD = 6.20350 CNY as the exchange rate Precision means "how many digit are expected in the final result", e.g. 123.456 has precision 6 Input: three lines, the first one being 1 for USD or 2 for CNY, the amount on the second one, and the precision on the third one; Output: one line showing the result of the conversion

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions