View the step-by-step solution to:

Write pseudocode for the following program. In how many days will I make 100 million cents (100 million cents is 1 million dollars), if I start




Write pseudocode for the following program.

In how many days will I make 100 million cents (100 million cents is 1 million dollars),

if I start earnings of 1 cent on day one? 

And each day I show up at work, I get double the pay.

day 1 -- 1 cent

day 2 -- 2 cents

day 3 -- 4 cents

...

day n -- 100 million cents 

What is n?

Top Answer

The best way to approach your question... View the full answer

code.txt

#include <iostream> using namespace std; int main() { int amount=100000000; int count_days=1; int amount_each_day=1; while(1) { cout<<"Day "<<count_days<<"=...

Sign up to view the full answer

Other Answers

total_cents = 0 daily_cents = 1 day_count = 0 while (total_cents<100000000)... View the full answer

Capture.PNG

Answer : The number of days required will be 28 . Please find pseudo code below :... View the full answer

CalculateMillion.java

public class CalculateMillion {
public static void main(String args) {
int n = 1;
int cent = 1;
while (cent < 100000000) {
cent = cent * 2;
n++;
}
}
} System.out.println("Number of days is...

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online