If you haven't checked out thenewboston on youtube he's a pretty good way to introduce yourself to java.
Type: Posts; User: ///M Dood
If you haven't checked out thenewboston on youtube he's a pretty good way to introduce yourself to java.
Nevermind, i got all of it...
Last thing I'd like assistance with if anybody is willing is with my print statement. I am supposed to print my variable i (years) vertically, followed by the values...
OK, so i figured out what was funky inside of the for loop.
class Weather
{
public static void main(String[] args)
{
// declare variables
int i = 1; // represents year
double temp...
hhrrmm... OK, I'll try to make some changes, thanks for the input.
The type cast of temp is desired, the 0 at the is not however.
So 1 - 12, then my variable i (year), my year variable (i) and a mysterious 0, repeat?
Sorry, i just thought you might want to see the little chunk that i altered. Here ya go:
class Weather
{
public static void main(String[] args)
{
// declare variables
int i = 1; //...
Welp, I have my years variable in the while loop if "(i > 5) break;" , that one seems to be taken care of. Next, i need to display the values of my "temp" value, 12 times per 4 total lines, which...
Code then description of problems:
class Weather
{
public static void main(String[] args)
{
// declare variables
int i = 1; // represents year
double temp = 0.0;
Wow, i just got that first try. Thank you! Code below for reference. You da man Greg
class Retirement
{
public static void main(String[] args)
{
int age = 30;
double salary = 30000.0;...
Hi,
I had a question about data type casting. Is it possible to take an integer of say 25, and convert that into being a percent so 0.25? How would that look? Where could i go to kind of grasp...
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;
In a class called tuna too i believe :/ Bucky is funny. A mixture of his tutorials and a few other sites isn't a bad route to take.
Welcome to the forums! Please read the info here: Announcements - What's Wrong With My Code?
What are you trying to do with your code? you seem to be missing quite a bit.
I tried that (kind of). Where i got confused is for this (int)((gdpPerCapita - gdpPerCapitaDollars) * 100); i totallyspaced on the whole order of operation thing. The whole math expression inside of...
As someone who started out using eclipse then went to compiling and running codes through the terminal/command prompt i would recommend not starting out with an IDE. But this is coming from someone...
YOU ARE AMAZING thank you so much! I tried variations of that for hours upon hours. You don't even understand. The one thing i never did try was putting the * 100 into parenthesis. Jeez,...
Bump, can anyone show where i am being stupid? Just don't say everywhere :)
Right, so, this then right???
int gdpPerCapitaCents = (gdpPerCapita - gdpPerCapitaDollars) * 100;
That is saying (43.75 - 43) x 100.
I get what you are saying, and i know spoon feeding...