Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help With A Program. I Dont Know Where To Begin. PLZ HELP ME

Help With A Program. I Dont Know Where To Begin. PLZ HELP ME

Scheduled Pinned Locked Moved C / C++ / MFC
csshelptutorial
4 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LilKoopa
    wrote on last edited by
    #1

    Ok, I have to do 3 programs for school and I am completely lost on how to start either of them off. If somebody could help me I would greatly appreciate it. Here is the info about the programs. 1. Population Create a New Project called YourLastnamePopulation. In a population, the birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: · The starting size of a population · The annual birth rate · The annual death rate · The number of years to display Write a function that calculates the size of the population for a year. The formula is N = P + BP + DP Where N is the new population size, P is the previous population size, B is the birth rate, and D is the death rate. Input Validation: Do not accept numbers less than 2 for the starting size. Do not accept negative numbers for birth rate or death rate. Do not accept numbers less than 1 for the number of years. 2. Lowest Score Drop Create a New Project called YourLastnameLowestScore. Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: · void getScore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called from main once for each of the five scores to be entered. · void calcAverage() should calculate and display the average of the four highest scores. This function should be called just once by main, and should be passed the five scores. · int findLowest() should find and return the lowest of the five scores passed to it. It should be called by calcAverage, which uses the function to determine which of the five scores to drop. Input Validation: Do not accept test scores lower than 0 or higher than 100. 3. Overloaded Hospital Create a New Project called YourLastnameHospital. Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered: · The number of days spent in the hospital · The daily rate · Hospital medication charges · Charges for hospital services (lab tests, etc.) The program should ask for the following data if the pati

    CPalliniC D 2 Replies Last reply
    0
    • L LilKoopa

      Ok, I have to do 3 programs for school and I am completely lost on how to start either of them off. If somebody could help me I would greatly appreciate it. Here is the info about the programs. 1. Population Create a New Project called YourLastnamePopulation. In a population, the birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: · The starting size of a population · The annual birth rate · The annual death rate · The number of years to display Write a function that calculates the size of the population for a year. The formula is N = P + BP + DP Where N is the new population size, P is the previous population size, B is the birth rate, and D is the death rate. Input Validation: Do not accept numbers less than 2 for the starting size. Do not accept negative numbers for birth rate or death rate. Do not accept numbers less than 1 for the number of years. 2. Lowest Score Drop Create a New Project called YourLastnameLowestScore. Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: · void getScore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called from main once for each of the five scores to be entered. · void calcAverage() should calculate and display the average of the four highest scores. This function should be called just once by main, and should be passed the five scores. · int findLowest() should find and return the lowest of the five scores passed to it. It should be called by calcAverage, which uses the function to determine which of the five scores to drop. Input Validation: Do not accept test scores lower than 0 or higher than 100. 3. Overloaded Hospital Create a New Project called YourLastnameHospital. Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered: · The number of days spent in the hospital · The daily rate · Hospital medication charges · Charges for hospital services (lab tests, etc.) The program should ask for the following data if the pati

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      LilKoopa wrote:

      Ok, I have to do 3 programs for school and I am completely lost on how to start either of them off. If somebody could help me I would greatly appreciate it. Here is the info about the programs.

      ...

      LilKoopa wrote:

      Again I would appreciate if someone could start me on the right path to completing these programs

      I suggest starting with problem 1, then problem 2, finally ending with problem 3. :rolleyes:

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      P 1 Reply Last reply
      0
      • CPalliniC CPallini

        LilKoopa wrote:

        Ok, I have to do 3 programs for school and I am completely lost on how to start either of them off. If somebody could help me I would greatly appreciate it. Here is the info about the programs.

        ...

        LilKoopa wrote:

        Again I would appreciate if someone could start me on the right path to completing these programs

        I suggest starting with problem 1, then problem 2, finally ending with problem 3. :rolleyes:

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        P Offline
        P Offline
        Perspx
        wrote on last edited by
        #3

        CPallini wrote:

        I suggest starting with problem 1, then problem 2, finally ending with problem 3.

        I second that - he'll also get extra points if there are chronology marks :-D Regards, --Perspx

        "I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
        "Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds

        1 Reply Last reply
        0
        • L LilKoopa

          Ok, I have to do 3 programs for school and I am completely lost on how to start either of them off. If somebody could help me I would greatly appreciate it. Here is the info about the programs. 1. Population Create a New Project called YourLastnamePopulation. In a population, the birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: · The starting size of a population · The annual birth rate · The annual death rate · The number of years to display Write a function that calculates the size of the population for a year. The formula is N = P + BP + DP Where N is the new population size, P is the previous population size, B is the birth rate, and D is the death rate. Input Validation: Do not accept numbers less than 2 for the starting size. Do not accept negative numbers for birth rate or death rate. Do not accept numbers less than 1 for the number of years. 2. Lowest Score Drop Create a New Project called YourLastnameLowestScore. Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: · void getScore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called from main once for each of the five scores to be entered. · void calcAverage() should calculate and display the average of the four highest scores. This function should be called just once by main, and should be passed the five scores. · int findLowest() should find and return the lowest of the five scores passed to it. It should be called by calcAverage, which uses the function to determine which of the five scores to drop. Input Validation: Do not accept test scores lower than 0 or higher than 100. 3. Overloaded Hospital Create a New Project called YourLastnameHospital. Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered: · The number of days spent in the hospital · The daily rate · Hospital medication charges · Charges for hospital services (lab tests, etc.) The program should ask for the following data if the pati

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          LilKoopa wrote:

          Ok, I have to do 3 programs for school and I am completely lost on how to start either of them off. If somebody could help me I would greatly appreciate it.

          Start by knowing that "either" is a choice made between two things, not three. That aside, you should be able to at least get started on any one of these. While you may need help with some of the details, you can't be in a programming course and not know how to start a project (regardless of whether it is pretty or even produces the correct result). I see that your question has been asked elsewhere. See here and here.

          "Love people and use things, not love things and use people." - Unknown

          "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups