bacteria growth chart

I was hoping that someone could help me or point me in the right direction. I am supposed to write a program that lets you put in a culture count and then calculates the count for 10 days. It is supposed to also create a string of asterisks that represent 1/10 of the original bacteria count along side the daily count. I really am lost and I don't really even know where to start. Any help would be very welcome:)
Last edited on
I am not sure I can help you to be honest, but I can shed some light on why you are not getting responses possibly.

I have read your problem but am uncertain as to your problem, to me it seems confusing.
Maybe if you re-word this in detail "or the exact wording from your problems text would be better" ... then maybe someone skilled could help?

Just trying to help!
my instructions are to write a program that you input a whole number representing the initial bacteria count. calculate the new count for 10 days using the formula newcount=originalCount * 2.0 (daynumber/10.0). Displaying the original count annotated as "Day 0 Count". Displaying a table showing the bacteria counts for the 10 consecutive days. Include the day number and the bacteria count for each day. When displaying the results create a string for each day in the output. Insert a number of asterisks in the string with each asterisk representing 1/10 of the original count. display string along side the day's count. Any help would be very much appreciated.
Last edited on
closed account (3qX21hU5)
Still is quite confusing to me so im not sure I can be of much help. But the way I always start problems is by creating the loops and or functions that I will need and keep going from there. Start small and once you have the small program compiling and running like it should expand on it. So pick something from the problem that you know you can do and then just keep adding onto it by researching or asking help with the problems you encounter
I could use some help with this. This is what I have so far but I know there is something wrong. I don't think that I am supposed to write each line out. I started doing this when I could not figure out how to get each day to multiply the newCount by the day and then drop down and do the next day again. If someone could help me it would be great.
#include "stdafx.h"
#include <iostream>
using namespace std;

int _tmain( )
int Day;
int i;
int NewCount;

cout << "Enter the original count of bacteria" << endl;
cin >> NewCount;

for (i = 0; i <= 10; i++)
cout << "Day " << i << " " " "<< "Count for the day" << " " " " << NewCount;
cout << endl;
cout << "Day1" << "Count for the day" << " " " " << NewCount * 2.0;
cout << endl;
cout << "Day2" << "Count for the day" << " " " " << NewCount * 3.0;
cout << endl;


system ("pause");
return 0;
First - edit your post so it uses code tags - the <> button on the right

In your for loop, make better use of the variable i. What if you had to do 1000 of these - are you going to have 2000 lines of code? You can append the value of i to the string "Day" and also use it in the multiplication.

The for loop should look like this:

for (i = 0; i < 10; i++) {
//do this stuff 10 times


Topic archived. No new replies allowed.