| | |
HELP! How do you make an Algorithmic loop?
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Thread Solved |
•
•
Join Date: Oct 2009
Posts: 5
Reputation:
Solved Threads: 0
I had to take computer science for my major, but I have no idea what's going on in this class.
I have to write an algorithm that reads in ten positive integers from the keyboard (upper size limit is 99). Output the additive total of the ten numbers and also output the smallest of those ten numbers. Illegal inputs (<1 or >99) are to be discarded and a replacement entry accepted if legal.
can anybody PLEASE tell me what this means
I have to write an algorithm that reads in ten positive integers from the keyboard (upper size limit is 99). Output the additive total of the ten numbers and also output the smallest of those ten numbers. Illegal inputs (<1 or >99) are to be discarded and a replacement entry accepted if legal.
can anybody PLEASE tell me what this means
0
#4 Oct 8th, 2009
A for loop will allow you to have a user enter the ten numbers
Did you have a specific programming language in mind?
for(variable=1 to variable is less than or equal to 10, then increment the variable) //In the body of the loop you will ask the users to enter the numbers
Last edited by Grn Xtrm; Oct 8th, 2009 at 7:24 pm.
Check out my new band URL on facebook. I'm the bass player. :) Become a fan and leave comments if you like.
URL on facebook!
URL on facebook!
0
#6 Oct 8th, 2009
Check out my new band URL on facebook. I'm the bass player. :) Become a fan and leave comments if you like.
URL on facebook!
URL on facebook!
0
#8 Oct 8th, 2009
And what is your choice? 
My personal favorite language is C++.
Have you ever learned about something called an array?
That could be used to store the 10 values, but if you've never learned arrays then there is a less effiecient way to solve your problem.

My personal favorite language is C++.
for(int i=1; i<=10; i++)
Have you ever learned about something called an array?
That could be used to store the 10 values, but if you've never learned arrays then there is a less effiecient way to solve your problem.
Last edited by Grn Xtrm; Oct 8th, 2009 at 7:53 pm.
Check out my new band URL on facebook. I'm the bass player. :) Become a fan and leave comments if you like.
URL on facebook!
URL on facebook!
0
#10 Oct 8th, 2009
"Jedenfalls bin ich überzeugt, daß der Alte nicht würfelt."
"I became very sensitive to what will happen to all this and all of us." -Two geniuses named Albert
"I became very sensitive to what will happen to all this and all of us." -Two geniuses named Albert
![]() |
Similar Threads
- Print Prime Numbers(using for loop) (C)
- Can't jump out of loop (C)
- making the program to loop again (C)
- Java Dummie Needs Loop Help (Java)
- loop help (C++)
- trying to make a "Do While" loop; loop (C++)
- Replace repititious code with a loop? (Visual Basic 4 / 5 / 6)
- Help w/ for loop. (C++)
Other Threads in the Computer Science Forum
- Previous Thread: how does computer engineering differ from software engineering?
- Next Thread: how to use fingerprint scanner with php program
| Thread Tools | Search this Thread |
ai algorithm algorithms amazon assignment assignments automata battery bigbrother binary bittorrent bizarre bletchleypark blogging bomb business cern codebreaker compiler computer computers computerscience computertrackingsoftware connect conversion csc dataanalysis dataintepretation development dfa dissertation dissertationthesis dissertationtopic ebook employment energy floatingpoint foreclosure foreclosuresoftware fuel gadgets geeks givemetehcodez government graphics hardware history homeowners homeworkassignment homeworkhelp humor ibm idea ideas internet iphone ipod itcontracts jobs kindle laser laws linkbait lsmeans mainframes marketing mobileapplication msaccess nano netbeans networking news os p2p piracy piratebay principles programming rasterizer research sam-being-cute sas science security sex simulation software spying stephenfry study supercomputer supercomputing sweden technology textfield turing turingtest two'scompliment virus ww2





