What have you tried? Post your code that shows the problem.
Printable View
What have you tried? Post your code that shows the problem.
hey sir Norms,
the codes you post on post #12 it will shows an output like my 2nd output right?
Compile and execute it and see what is printed.
Sir, every false statement will move to the >>>} System.out blah blah right?
There is no boolean variable involved in this logic. It is only loops and math.
arghhhh.... can't help myself...
Ok. Thats a start. You've printed the first line with some spaces and some *s
Now add code to print out the next lines.
You need a loop for the spaces and a loop for the *s
Can you explain why you start with x=5 in the first for loop?
It would help if you used variable names and added comments to the code like I did in post#12
i gave a value of 5 to x so if then it goes back to that statement with an increment it will goes false and print an *s because the value of n is no longer equalled or greater than the value of x.
but i know that's wrong also. because if it goes to System.out.print("*"); it will goes back to the first statement and will tell that every statement is false. And then it will always print *** infintely or what
Now add code to print out the next lines: 2 to 5.
You need a loop for the spaces and a loop for the *s
can i do this?
}
System.out.print("*");
System.out.println();
}
Try it and see what happens.
What is it you want those two statements to do?
Can they be merged into a single statement?
ehehe. just want to make a new line after printing the last * but it is wrong too. hayyayayay. im near to surrender
Sir back to my question cause i didnt understand what youve answered for that. ehehe!
Is every false statement goes after } ?
There are no true or false statements in this problem. It is done with loops and math.
im about to give up... geesh. i know this is too easy but im to newbie for this... not enough time. need to pass this later. ouch. =( and i dont have sleep yet.
Try a very simple exercise:
Write a loop to print x number of "*" on a line.
If x is 0 you print none,
if x is 1 you print 1
if x is 2 you print 2
etc
cant understand that. pitty on me
Your code shown in the first post does it.
I guess you should give up for now and try later.
cant i have the answer from you? not far from what is my script before? i promise to be better next week. i just need to pass this later on. =(
i just need the script for this outputs
Code java:* ** *** **** ***** and this one ***** **** *** ** *
Come on back when you have had time to write the code.
See post#42 It has as simple a suggestion as I can make.
By the way, SIR Thanks so much your time.
You're welcome.
Get a good sleep and try again tomorrow.
there's no tomorrow. hehe! ill fail this assignment. hehe! but ill be better for the next homework. geesh. Thanks Sir! Night!
Hi Sir! Can't sleep... already got headache... im about to sleep when i suddenly thought of this.
Code java:
am i on my way nearer or further?