Write a C++ program that asks the user to input the age and gender (M/m for...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a C++ program that asks the user to input the age and gender (M/m for male, F/f for female) of 10 rabbits. Your program should count the number of female and male rabbits and print the results on the screen. Sample Input/Output Enter age and gender:1 m Enter age and gender:2 M Enter age and gender:4 f Enter age and gender:5 F Enter age and gender:1 M Enter age and gender:2 M Enter age and gender:3 F Enter age and gender:1 M Enter age and gender:2 M Enter age and gender:3 F Number of male=6 Number of female=4 Write a C++ program that asks the user to input the age and gender (M/m for male, F/f for female) of 10 rabbits. Your program should count the number of female and male rabbits and print the results on the screen. Sample Input/Output Enter age and gender:1 m Enter age and gender:2 M Enter age and gender:4 f Enter age and gender:5 F Enter age and gender:1 M Enter age and gender:2 M Enter age and gender:3 F Enter age and gender:1 M Enter age and gender:2 M Enter age and gender:3 F Number of male=6 Number of female=4
Expert Answer:
Answer rating: 100% (QA)
Sure here is the C program that asks the user to input the age and gender Mm for male Ff for fe... View the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
1. Rework Exercise 1 for C instead of R. Refer to Exercise 1, Suppose a game has payoff matrix Reduce the determination of an optimal strategy for R into a linear programming problem. Just set up the...
-
Alpha Company used the periodic inventory system for purchase & sales of merchandise. Discount terms for both purchase & sales are, FOB Destination, 2/10, n30 and the gross method is used. > Alpha...
-
At DEF Insurance Company, agents are employees of the company who are paid a salary plus commissions. This is an example of what type of insurance marketing system? OA) Fraternal B) Direct response...
-
A textile fiber manufacturer is investigating a new drapery yarn, which the company claims has a mean thread elongation of 12 kilograms with a standard deviation of 0.5 kilograms. The company wishes...
-
1. Use computer magazines or the Internet to investigate one of these DBMSs: DB2, SQL Server, MySQL, Oracle, or Sybase. Then prepare a report that explains how that DBMS handles two of the following...
-
The agreement contained a liquidated damages clause that held, Should Employee voluntarily terminate or the Employer terminates his/her employment within one year of executing this Agreement,...
-
Baxter Inc., a developer of radiology equipment, has stock outstanding as follows: 18,000 shares of cumulative 2%, preferred stock of $75 par, and 40,000 shares of $10 par common. During its first...
-
Car Crash Investigation Background information: A collision occurred involving two vehicles on Route 28 N. The speed limit in this zone is 45 mph. A 2011 Honda Odyssey minivan was stopped at the...
-
You are a young CPA just starting your own practice in Hollywood, California, after five years experience with a Big 4 firm. You have several connections in the entertainment industry and hope to...
-
XYZ Ltd. is a pension fund managing the portfolios of people saving for the later years of their lives. As such, it prides itself on delivering low but reliable returns on investment, which consist...
-
Campaign's purpose focuses on the UN Sustainable Development Goals of Gender Equality. With the intended commercial impact of raising brand awareness. X-runner will aim to launch a new line of...
-
How would you translate SAS's art of employee management in terms of the P-O-L-C framework? SAS is a global company. Do you think that the benefits offered and the strategy used to improve employee...
-
Trace and find the values of j, f and e after execution of each loop: (Note: 2 questions for this items, please keep your complete trace handy) e:= 0, f:-2 for j :=1 to 4 f:=f+j e:=c+f print j, f, e...
-
Compute the summations of the following: 2 i(i+1) j=1
-
Using the information below, complete (i) the operating cash flow section of the Statement of Cash Flows and (ii) the note to the accounts for Noosa Ltd. Your presentation must be consistent with the...
-
Nick had a general-purpose truck (Old Truck) that he used in his sole proprietorship. Nick originally acquired the Old Truck in 2018 by paying $23,790 in cash, performing consulting services for the...
-
On April 29, 2015, Auk Corporation acquires 100% of the outstanding stock of Amazon Corporation (E & P of $750,000) for $1.2 million. Amazon has assets with a fair market value of $1.4 million (basis...
-
Repeat Programming Project 10 from Chapter 5 but use an array to store the movie ratings instead of separate variables. All changes should be internal to the class, so the main method to test the...
-
Repeat the previous programming project, but sort the Pet objects by pet weight instead of by name. After displaying the sorted data on the screen, write the number and percentage of pets that are...
-
Derive a class BuyNItemsGetOneFree from DiscountPolicy, as described in Exercise 10. The class should have a constructor that has a single parameter n. In addition, the class should define the method...
-
What are the purposes of the international capital market?
-
A strong US dollar makes imports cheaper for American consumers, but it also makes American exports less competitive and more expensive on the global market. What are the implications of a strong and...
-
You are the senior accountant for a business that regularly imports spare parts for a range of your products from overseas suppliers. You have been instructed by the CEO to look at ways you can save...
Study smarter with the SolutionInn App