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...
-
Q7. Given the system represented by the augmented matrix, solve for the value of x 3 ? (Enter numerical value only.) 1 0 1 6 0 12 0 12 3 0 6 18
-
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 metal ring with a break in its perimeter is dropped from a field free region of space into a region with a magnetic field. What effect does the magnetic field have on the ring?
-
For the following independent situations, assume you are the audit partner on the engagement. For each situation, using the framework for reporting decisions, identify the appropriate audit report...
-
There are several exceptions to the hearsay rule. Identify at least three exceptions and give an example of each.
-
When a soccer ball is kicked toward a player and the player deflects the ball by "heading" it, the acceleration of the head during the collision can be significant. Figure 2-38 gives the measured...
-
Ava's Avocado Company operates an avocado business. The company produces two products: guacamole and avocado oil. Guacamole is made using the avocado flesh and avocado oil is made using the avocado...
-
Preparing an Individuals Tax Form. Caleb Lee graduated from college in 2018 and began work as a systems analyst in July of that year. He is preparing to file his income tax return for 2018, and has...
-
Q.No. 3 Estimated Time To Complete Question (30 Minutes) You are a Finance Manager of SBK Pharma Ltd. The Director Finance has asked you to analyze two proposed capital investments, Project Indus and...
-
Sale of Plant Asset Raine Company has a machine that originally cost $80,000. Depreciation has been recorded for five years using the straight-line method, with a $8,000 estimated salvage value at...
-
How do you ensure data security and compliance with regulatory standards (such as GDPR or HIPAA) in a database system handling sensitive information, considering encryption, access controls, and...
-
5. What is the velocity of a car that has a mass of 1200 kg and it traveling with a momentum of 3000 kgm/sec? 6. An elephant is running at 3 m/sec and has a mass of 500 kg. a. What is the momentum of...
-
The total number of votes cast A complete list of candidates who received votes The percentage of votes each candidate won The total number of votes each candidate won The winner of the election...
-
Seiko\'s current salary is $ 1 0 6 , 0 0 0 . Her marginal tax rate is 3 2 percent, and she fancies European sports cars. She purchases a new auto each year. Seiko is currently a manager for Idaho...
-
Find the slope of the tangent line to the curve defined by 624 +7xy-y= -38 at the point (-1,4). The slope of the curve at the point (-1, 4) is
-
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...
-
How closely related do you believe language and thought to be? During the production of Chapter 3 in this book, the authors and editors debated whether we should use the word "autistics" or the...
-
When did human language originate?
-
How do children learn language?
Study smarter with the SolutionInn App