FindArena > Find Arena > Money

 
Thread Tools Display Modes
  #1 ()
opponoNaise : Array Traversals 2
1) Using main, write a program that prompts the user to enter how many test scores there are in a class. Your program will then prompt the user repeatedly to enter that many scores. You may assume that all test scores are in the range of 0 to 100 and are whole numbers.
2) Write a function called getSecondBest that takes in an array of integers from part 1 and returns the second largest integer within that array. Use main to test your function. Only use one loop. (Hint: inside your function maintain two variables… one that stores the largest value currently seen and one that stores the second largest value currently seen)
3) Write a function called isInOrder that takes in an array of integers. Your function will return true if all numbers are in ascending order (least -> greatest) and the function will return false otherwise. Only use one loop. (Hint: this time around you need to look at two numbers at a time rather than just one)



Comment your code please.
Make sure all functions do not depend on the specific example shown, but will work for ANY array.
  Reply With Quote
  #2 ()
bettzerboy : Did you have a question, or are you just hoping that someone will do your homework for you?
  Reply With Quote
more..
  #3 ()
Zeromiraxer : The idea is to encrypt the the regular code in php and decrypt using javascript.

The encryption will be ROT47 (i already have a php function for this)

I have the javascript figured out but i dont know how to effect code between 2 php lines, like so:

<?php $something; ?>
<font style="color:red"> effected code </font>
<?php $end_something; ?>

I could simply convert the code in the source but it would be a pain to edit.
  Reply With Quote
  #4 ()
Kecysypecrade : That's easy. Simply add an echo function to print off a variable

<?php $something; ?>
<font style="color:red"><?php echo($somevariable); ?></font>
<?php $end_something; ?>
  Reply With Quote
  #5 ()
emibegomSit : Day trading business. I want to be a day trader so bad I have spent the last year and a half reading, demo trading, studying. and learning the ins and outs about Forex and the Stock market. I want to know where you got your starting cash from, if you could tell me the story on how you started that would be very thankful. Thank you very much!
  Reply With Quote
  #6 ()
Sidaadmiple : here , we call it a job or 3 .
living on less than we earn.
  Reply With Quote
  #7 ()
chistazgf : I agree with Rob - a job works amazingly WELL.
  Reply With Quote
  #8 ()
mokundegrc : Just like Credit cards provide annual rebates on the amount of spending. Is it true thet some of the brokers are now starting to give annual credit for the brokerage fee charged during the year. I came to know partially this from some chatter about TD Ameritrade, Etrade, Fidelity and Tradeking. And want to confirm if any one is receiving them. Aas the brokerage companies are tired of customer switching the companies every year between them and also taking huge cash with them.

https://www.tdameritrade.com/offer/ta90days/index.html?

https://scs.fidelity.com/other/offers/registration_casha.shtml

https://us.etrade.com/e/t/jumppage/viewjumppage?PageName=DC_TF60D_2500CFC_May13
  Reply With Quote
  #9 ()
ZRSamuel : Your niece, Sally, is a lemonade stand mogul. Her lemonade stand has been the most successful in the neighborhood for the last 5 years. She’s ready to get out. She wants to sell her lemonade stand to her younger sister, Sarah. Her younger sister contracts you, the business major, to advise her in the transaction. The lemonade stand has no valuable assets, so its value is derived solely from the ability to generate cash flows. The lemonade stand had free cash flow this year (year 0) of $265. Sales have been growing steadily, and are expected to continue growing steadily for the foreseeable future (aka, infinitely), at 5% per year. The applicable discount rate is 15%. However, Sarah doesn’t have much cash and will have to finance the purchase of the lemonade stand as a 5-year annuity to Sally. How much will Sarah have to pay Sally per year over the next five years to take over the lemonade stand?
A.)$830.06
B.)$756.13
C.)$652.14
D.)$555.00
  Reply With Quote