Here's what i got to work:
public class Test
{
public static void main(String[] args) {
int i = 1;
while(true)
Type: Posts; User: ///M Dood
Here's what i got to work:
public class Test
{
public static void main(String[] args) {
int i = 1;
while(true)
Yes, prior instructions stated that i be initialized to 1. I'm just leaving it for the moment, the whole rest of the assignment is a freaking mess as well.
OK, i'm really close i think. I got the code to compile and display the desired output, only problem is that in the assignment it requires me to declare a variable of type int, name it i and set it...
OK, I'll give understanding your post a solid effort before i report back. Just scratching my head how a while(true) statement would be formatted without the if-else statements. I am still quite new,...
Well, after the println, it's what worked in the final while(true) loop. I tried rearranging everything in the loop like this:
while(true)
{
System.out.println(i);
if (i > 5) break;
else...
"Using a while(true) statement, loop over Year i from 1 through 5, EXCEPT i = 3. Use a break statement to exit the loop as appropriate. When i = 3, it should skip the calculations and go the next...
Code then description of problem:
class Weather
{
public static void main(String[] args)
{
// declare variables
int i = 1; // represents year
double temp = 0.0;