The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.
I'm Just Learning Java I Know A Few Things Like You Need ; After Certain Things Also For This Program Ill Be Using A If, And A While Statement Within My Loop , I Just Dont Know How To Get It Going
I'm Just Learning Java I Know A Few Things Like You Need ; After Certain Things Also For This Program Ill Be Using A If, And A While Statement Within My Loop , I Just Dont Know How To Get It Going
Then you should go carefully through the tutorial. There are examples of all that.
int sum = 0;
if (int i = 1; i <= 1000; ++i) {
sum += i;
while( )
}
is this better
Not really no; I think you're just guessing what your program should be without
knowing exactly what to do. Who gave you the idea to put that (incorrect) if-
statement there? An if statement takes a boolean value/expression and if it's
true the body of the if-statement will be executed. You actually put in an entire
for-clause in there. Try again and look up what for-loops can do. btw, I have no
idea what that while( ) thing does in there ;-)
Comment