can somebody please help me out, i need this code written for a class of mine but Iam completely stumped! Its gotta be a program that reads in 0 to n floats from the console and calculates the average of the numbers Any help with those would be GREATLY appreciated
Regarding your question, we won't write the code for you and deprive you of a learning experience, but if you tell us what you've done, we can give you some hints on how to proceed.
Also, I'm moving this to the Java in General(beginner) forum.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
well, i'll give "dude man" (or whatever he is called now ) a start:
which is not so great. probably what is wanted is an interactive program - it runs, and waits for floats to be entered and return to be pressed till something ("q" or "Q") is entered at which point it kicks back the average. anything not a float but still a number is accepted. anything not a number is rejected. would like to see that myself regs peter
^^^^^there we go^^^^^ im not albanian, im not thai, and im not chinese. So who am i??? the assignment was too hard for me, so why not ask a fellow grenhorn for some help? hope you dont mind
Originally posted by charles atlas: ^^^^^there we go^^^^^ im not albanian, im not thai, and im not chinese. So who am i??? the assignment was too hard for me, so why not ask a fellow grenhorn for some help? hope you dont mind
Not at all! I told you guys to use JavaRanch as a resource.