public static void main(String[] args){
/*The number of bacteria, B, in a culture that’s subject to refrigeration can be
approximated by this formula:
B=300000*e^-0.032t
Using this formula, write a program that prompts the user for a value of time, calculates the
number of bacteria in the culture, and displays the result. */
Scanner i=new Scanner(System.in);
double B,e=2.71828,t;
Math.pow((double)e, (double)t);
System.out.println("Please input your value of time: ");
t=i.nextDouble();
** B = (300000)*Math.pow(e),(-0.032 * t);**
System.out.println("Number of bacteria: "+B);
}
it gives me an error
how can i make a formula multiply with that e^-0.032t?
- Full Post
No comments:
Post a Comment