Assignment: Copy and paste the following code into a text or code editor like Notepad or...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Assignment: Copy and paste the following code into a text or code editor like Notepad or Sublime Text. There is also a copy of the source code file that you can download directly on Nuoodle. (Microsoft Word is not a good choice for this because of how it tries to format things for you.) For every line of code, add a comment on the preceding line explaining what happens at that line. For example, if you see = 3; you would add a comment to the code and it would look something like this: // Assign the value 3 to x X = 3; Please comment only after where it says to start commenting" and do not comment after where it says "stop commenting". #include #include using namespace std; int main() { // start commenting unsigned int age, grade; string name, school, response do { "y"; cout < < "Please enter your name: cin >> name; " cout < < "Hi, < < name < < "! How old are you? "; cin >> age; while (age >= 115) { cout < < "No, really, how old are you? 6:34 PM Sun Jan 28 nuoodle.norwich.edu CS140 COMPUTER PROGRAMMING cin >> age; } HOMEWORK EXERCISES 1 if (age > grade; if (age > (grade + 6)) < < "?" < < endl; } cout < < "Aren't you a little old for grade " < < grade cout < < "And which school do you attend? i cin >> school; cout < < "OK, so let me get this straight, your name is "; cout < < name < < " and you are < < age < < " years old. "; if (age Assignment: Copy and paste the following code into a text or code editor like Notepad or Sublime Text. There is also a copy of the source code file that you can download directly on Nuoodle. (Microsoft Word is not a good choice for this because of how it tries to format things for you.) For every line of code, add a comment on the preceding line explaining what happens at that line. For example, if you see = 3; you would add a comment to the code and it would look something like this: // Assign the value 3 to x X = 3; Please comment only after where it says to start commenting" and do not comment after where it says "stop commenting". #include #include using namespace std; int main() { // start commenting unsigned int age, grade; string name, school, response do { "y"; cout < < "Please enter your name: cin >> name; " cout < < "Hi, < < name < < "! How old are you? "; cin >> age; while (age >= 115) { cout < < "No, really, how old are you? 6:34 PM Sun Jan 28 nuoodle.norwich.edu CS140 COMPUTER PROGRAMMING cin >> age; } HOMEWORK EXERCISES 1 if (age > grade; if (age > (grade + 6)) < < "?" < < endl; } cout < < "Aren't you a little old for grade " < < grade cout < < "And which school do you attend? i cin >> school; cout < < "OK, so let me get this straight, your name is "; cout < < name < < " and you are < < age < < " years old. "; if (age
Expert Answer:
Related Book For
Integrated Accounting
ISBN: 978-1285462721
8th edition
Authors: Dale A. Klooster, Warren Allen, Glenn Owen
Posted Date:
Students also viewed these algorithms questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Python and most Python libraries are free to download or use, though many users use Python through a paid service. Paid services help IT organizations manage the risks associated with the use of...
-
On January 1, 2020, Cullumber Industries Ltd. issued 1,780,000 face value, 5%, 10-year bonds at 1,648,990. This price resulted in an effective-interest rate of 6% on the bonds. Cullumber uses the...
-
Consider the beta probability density function f(x) = Ax9 (1-x)3 for 0 < x < 1 and f(x) = 0 elsewhere. (a) What are the values of the parameters a and b! (b) Use the answer to part (a) to calculate...
-
Justify the fact that with information security being a new field, it is often rife with a lack of understanding about what qualifications applicants need to fit in the roles they fill. Assess the...
-
Reconsider the data from Problem 56. What is the capital recovery cost of Model 127B? Data from problem 56 Octavia Bakery is planning to purchase one of two ovens. The expected cash flows for each...
-
Sierra Company manufactures woven blankets and accounts for product costs using process costing. The following information is available regarding its May inventories. The following additional...
-
As an International Business Strategist advise on how Porter's Diamond is a useful concept in explaining home and host location strategies in International Business? Your answer should make reference...
-
Every transcultural set of ethics standards for global business practice includes the principle of human rights. For example, the UN global compact says that companies should protect internationally...
-
The textbook cites four factors the firm cannot control regarding the cost of capital. These are interest rates, credit crisis, market risk premium, and tax rates. Pick at least one of these factors...
-
Waller, Inc., is trying to determine its cost of debt. The firm has a debt issue outstanding with 12 years to maturity that is quoted at 103 percent of face value. The issue makes semiannual payments...
-
Wong, owner of a small business, has a used stamping machine for sale. He offers to sell it to Vasquez for $25,000. Wong dies prior to Vasquez's acceptance. At the time he accepts he is unaware of...
-
java Specifications You will create the following classes: TestClassComposite - holds main and the array or arrayList Date - has a month, day, and year Name - has a first name, middle initial, and...
-
Calculate present value of the retirement benefit: Stan elects to receive his retirement benefit over 10 years. The first monthly payment of 2000 will be paid one month from now and each subsequent...
-
Prepare a scholarly paper that differentiates foreign exchange trading within Asia as compared to Europe and the Americas. Evaluate these flexible and fixed exchange rate systems within this...
-
Determine whether the lines are parallel, perpendicular, or neither. 2x + 3y = -12, 2y - 3x = 8
-
A joint arrangement whereby the parties that have joint control of the arrangement have rights to the assets, and obligations for the liabilities, relating to the arrangement is known as: a. Joint...
-
To classify a joint arrangement as either a joint operation or a joint venture, the Islamic bank should consider: a. Structure and legal form of any separate vehicle b. Expenses, including its share...
-
To ensure that sufficient cash is available at any point in time to fund the withdrawal of cash by its clients, banks use: a. Current account b. Restricted investment account c. Unrestricted...
Study smarter with the SolutionInn App