Prompt the user to enter the total capacity of the cage.

Assignment Help C/C++ Programming
Reference no: EM13938215

A farmer has a bunny farm. He has cage capacity for a limited number of bunnies. A pair of adult bunnies will give birth to 2 bunnies (1 male and 1 female) at the end of every three months. A bunny is an adult when he or she reaches the age of 4 months. (i.e. 1st pair at age 3 months give birth to1 male and 1 female at the end of the 4th month). For example:
Number of months   Number of bunnies
           0                                    2
           3                                    4
           6                                    8
           9                                   16
          12                                   32
and so on..........

Write a complete C++ program to do the following:

1. Prompt the user to enter the total capacity of the cage.

2. Determine when the farmer will have to separate the bunnies in order to prevent the birth of any more.

3. Convert the above time in months to years and months.

4. Determine the number of bunnies that could still be accommodated in the cage when the bunnies were separated.

5. Prompt the user to input a time (in months) to check how many bunnies are present at a given time.

6. Print your results as indicated on the next page.

Save your program as bunny_world.cpp

Program 8 will be worth 100 points and will be assigned points as follows:
Program compiles 20 Points
Documentation
Header documentation (programmer info) 5 Points
Input
User-prompted data 15 Points
Output
Personal Information 5 Points
Capacity of cage 5 Points
Number of months when cage is full 5 Points
Full capacity reached in years and months 5 Points
Remaining space available at time of separation 5 Points
Number of bunnies in cage at a specified time 5 Points
Method

In addition to the usual programmer statements your output should include the following:

Your cage can hold number of bunnies.
In months you will have to separate the boy bunnies from the girl bunnies.
This is the same as years and months.
When the males and females are separated your cage will still be able to accommodate extra bunnies.
After time you will have bunnies in the cage.

Tip: The items in color represent values your program is to either input or calculate and print.

BONUS: If you can correctly write this program using functions for any or all of the following, you can receive extra credit. I will award 5 extra points for any of the following done correctly using functions. Remember, you may or may not have to pass data for any or all of these. If you cannot do all of them, try any that you can do.

 Printing of Programmer information

 Cage size (prompt to user and storage of input to be used by program)

 When bunnies will have to be separated

 Months to years and months conversion

 Number of extra bunnies your cage can hold after bunnies are separated

Reference no: EM13938215

Questions Cloud

Why would such migration be important : In many countries, conservationists are trying to design national park systems so that "islands" of natural area (the big parks) are connected by thin "corridors" of undisturbed habitat. The idea is that this arrangement will allow animals and pla..
Project management in managing the implementation : How effective is Project Management in managing the implementation of projects across different industrial and business sectors?
What potential cost individuals might incur during migration : Tell what other cues the males could use in this migratory return to their previous homesites and describe how they could orient or navigate using these cues. Remember that they fly during the daytime.
Creating a labview virtual instrument : Question 1 - Creating a LabVIEW virtual instrument (VI) Create a VI for the RLC series circuit shown below that will calculate the following values:
Prompt the user to enter the total capacity of the cage. : Determine when the farmer will have to separate the bunnies in order to prevent the birth of any more.
Why is hydrogen is place in group one not seven : Why is hydrogen is place in group one not seven
Contemporary events-discuss in relation to the major themes : Is security in the 21st century about great power rivalry or about problems of disorder and the failure of governance? Choose one of the following contemporary events and discuss in relation to the major themes and theories that we have covered in ..
Porters three generic strategies : What are Porter's three generic strategies and how can a company add value by using Porter's chain analysis
Prepare the entry to record repayment of the note on april : Indicate how the note and the accrued interest would appear on the balance sheet at December 31, 2009. Prepare the entry to record the repayment of the note on April 30, 2010.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program in c to implement bubble sort

Write a program in c to implement bubble sort?

  Write a program that reads numbers

Write a C++ program that reads N positive numbers from the keyboard, calculates and shows the smallest number of all numbers

  Write a program that uses the class salariedemployee

Write a program that uses the class SalariedEmployee shown below. Your program is to define a class called Administrator, which is to be derived from the class SalariedEmployee. You are allowed to change private in the base class to protected. You..

  Calculates the average of those numbers

Write a C program which takes n number of element from user (where, n is specified by user), stores data in an array and calculates the average of those numbers. Output of the program should look like this;

  Write a program to print out 30 real random numbers

Write a program to print out 30 Real Random Numbers with specific limitation (e.g. the real random numbers should be the real number between min=11.1 to  max=222.2).

  Write program that reads one line of text and then prints it

Write a program that reads one line of text and then prints it with all its blanks removed. Write a program that reads one line of text and then prints the number of words that were read.

  Algorithm to determine which items to take to max weight

Write an algorithm to determine which items to take to maximize the weight of his loot bag. He cannot take a fraction of an item and each item must be taken, or left behind. Loot bag size is Z and and the input is an array of item wieghts as integers..

  C++ pointer function synopsis

C++ pointer Function Synopsis: char *amonthLess(char *dateString) Description: Variable dataString is a valid date in a form of mm/dd/yyyy Given the above information, write a main() program that asks a user to enter a date in a form of mm/dd/yyyy..

  Implement program which performs basic arithmetic operation

Write a complete C program that prompts for two integer numbers (one number at a time, or both at once, as you wish), reads them into two variables of type int find then calculates and prints the following five values

  Loops and nested loops

Loops and Nested Loops- Suggest one (1) example of a problematic programming situation or scenario that nested loops could at least partially resolve. Justify your response

  Implement method to advance any given date by one day

Write C++ implementation of this method. Create and specify any other methods that you require. Include comments which will be helpful to someone who will maintain implementation in the future.

  Consider the following schema of an online flight

consider the following schema of an online flight reservation agency.customercid lastname firstname dobflightfid

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd