The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
I need to modify the source code I submitted:
1) Modify the source code to use aforloop instead of awhileloop. Currently this program uses a while loop to determine how many years it will take to grow the company to an annual sales of $150,000 or greater assuming a 5.5% growth rate. Your job is to modify this source code to produce the same result using aforloop.
Â
2) In addition to the current output, display the following message if the years are greater than or equal to 100: This is a long time to wait. Otherwise display this is a reasonable time to wait for any other value for years.
Hints:
· There isn’t much that has to change from the original source code to implement aforloop instead of awhileloop. Here’s a partial head start of what the for loop will look like:
o for (years = 0;etc.)
Â
· refer to your text book, slides, and examples discussed in class for loop examples
Â
· Use the following test data, sales: 1000
Attachments:
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll