LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 292 users online 224830 members 271 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
EyE Of ThE StorM
Peeves: What really gets your dander up?
Mood: Lonely
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
1 online / 48 MPM
Fresh Topics
  LiveWire / Technical Forums / General Tech Discussion / Viewing Topic

what the hell is wrong with this java code
Replies: 4Last Post Oct. 14 7:46am by King Kong
Welcome to LiveWire!
We're Stronger Together.
Join the Community
Single page for this topic Email Print Favorite
( King Kong )


Ghostbuster

Patron
Reply
Code:
import java.util.Scanner;
public class TotalMean
{

// main method
public static void main(String args[])

{

Scanner input = new Scanner(System.in);
System.out.println("enter a number:> ");
int response1 = input.nextInt();
System.out.println("enter a number:> ");
int response2 = input.nextInt();
System.out.println("enter a number:> ");
int response3 = input.nextInt();
System.out.println("enter a number:> ");
int response4 = input.nextInt();
System.out.println("enter a number:> ");
int response5 = input.nextInt();
System.out.println("Five numbers entered ...");
System.out.println("Numbers entered:" +  response1 + response2 +  response3 + response4 + response5 );
int total = response1 + response2 + response3 +  response4 + response5;
mean = total / 5;
System.out.println("total: " + total + "mean: " + mean);
}
}


I just need somone to look at it really. youy know diffrent set of eyes may see something I don't
edit updated code

Post edited at 6:34 am on Oct. 14, 2009 by King Kong

-------
Pandora didn't think outside the box


6:23 am on Oct. 14, 2009 | Joined: Feb. 2006 | Days Active: 1,116
Join to learn more about King Kong Wales | Straight Male | Posts: 26,844 | Points: 39,180
LiveWire Humor
( King Kong )


Ghostbuster

Patron
Reply
found one mistake on the total line

-------
Pandora didn't think outside the box

6:30 am on Oct. 14, 2009 | Joined: Feb. 2006 | Days Active: 1,116
Join to learn more about King Kong Wales | Straight Male | Posts: 26,844 | Points: 39,180
loveygrl


Connoisseur

Ad Free
Reply
i found one

-------
TE QUIERO..143..IT ALL MEANS THE SAME WHEN I
THINK OF YOU...

7:02 am on Oct. 14, 2009 | Joined: May 2009 | Days Active: 90
Join to learn more about loveygrl Maryland, United States | Straight Female | Posts: 4,394 | Points: 6,008
( King Kong )


Ghostbuster

Patron
Reply
Quote: from loveygrl at 3:02 pm on Oct. 14, 2009

i found one
this isn't find waldo where you say found him. where is the mistake please

-------
Pandora didn't think outside the box

7:07 am on Oct. 14, 2009 | Joined: Feb. 2006 | Days Active: 1,116
Join to learn more about King Kong Wales | Straight Male | Posts: 26,844 | Points: 39,180
( King Kong )


Ghostbuster

Patron
Reply
fixed final mistake

-------
Pandora didn't think outside the box

7:46 am on Oct. 14, 2009 | Joined: Feb. 2006 | Days Active: 1,116
Join to learn more about King Kong Wales | Straight Male | Posts: 26,844 | Points: 39,180
Single page for this topic Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / General Tech Discussion / Viewing Topic