I am having a difficult time Looping
My teacher made up his own problems, and I need help with 2 of them, I know absolutely nothing about Java loops.
Write a program that prompts the user to input an integer and then outputs both the individual digits of the number and the sum of the digits. For example, the program should: output the individual digits of 3456 as 3 4 5 6 and the sum of the digits is 18...
Write a program that uses a while loop to perform the following steps:
a) Prompt the user to input 2 integers: firstNum secondNum, firstNum must be less that the second
b) Output all odd numbers between the firstNum secondNum
c) Output the sum of all even numbers between firstNum and secondNum
d) Output the numbers and thier square of odd numbers between firstNum and secondNum
e) Output all uppercase letters
Re: PLEASE PLEASE I AM STUCK...
See my signature on asking questions the smart way. Your post title is liable to be ignored, and you haven't provided us any indication of what you've tried so far.
I recommend you start by reading through this: Control Flow Statements (The Java™ Tutorials > Learning the Java Language > Language Basics)
Re: I am having a difficult time Looping
WTF has that got to do with the other 4 tasks?
Originally Posted by ThejavaBUM