Aha! Thanks Norm. You've helped me multiple times, I really appreciate your dedication to this great forum.
--- Update ---
Agreed, I'll keep that in mind. Although seeing how small my code...
Type: Posts; User: phlegm
Aha! Thanks Norm. You've helped me multiple times, I really appreciate your dedication to this great forum.
--- Update ---
Agreed, I'll keep that in mind. Although seeing how small my code...
For some reason, when I create an if statement in my public double price() class, it gives me an error which says: This method must return a result of type double
public double price()
{ ...
I created 7 integer variables for the days of the week from 0 - 7. I then tried to make it so
if(day==2) //this is a monday
{
I don't know what to do here to multiply 1 and ("\t"). I need a...
Glad I made you laugh, and sorry for the late reply, but I'm not quite sure how I would execute that. I've been trying different methods for days and none of them work.
Hello, I am trying to create a project where if the user inputs certain facts (year, month, day that 1st of month falls on, and whether or not a leap year) about the date, it will print the calendar...
Hey everyone. My name is phlegm. I am currently learning java and hope to help people out once I become more experienced. See y'all later.
3:-O
I figured it out, thanks everyone (Parranoia, and Norm).
It was a very foolish error. The control statement was (g<0), when it should of been (g>0). I feel dumb. But thanks!
This does help a lot, but do I create these variables in or out of the loop? Or does it not matter?
--- Update ---
Ok, so I think I improved my code. Thanks @Parranoia.
...
I honestly don't know how I would set that up. sorry
Yes I believe it would, but I don't know how to use g twice in the loop. :/
Using the method I'm using, I would have a lot of code, so I realized I couldn't keep doing it the way I am.
What I'm trying to do is to make only one System.out.println that will print every iteration. For example, if I enter in "6" into the command prompt, I would like this to be printed.
36
25
16
9...
What I am trying to accomplish is having the user input a number (5 for example), and then printing 25, 16, 9, 4, and then 1 (squaring each number until it hits 0).
Here is the question: 2457
...