Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

noob help

Name: Anonymous 2006-08-31 2:12

I am really new at programming anything, and taking a java class.

so i have a simple request:

What is the information i input to divide the sum of 3 numbers by their product?

this is what i have so far, probably waay off.


import java.util.*;

public class MyFirstProgram
{
    public static void main(String[] args)
    {
        System.out.println("Hello out there.");
        System.out.println("I will divide the sum of three numbers by thier product for you.");
        System.out.println("Enter three whole numbers on a line:");

        int n1, n2, n3, sum, product;

        Scanner keyboard = new Scanner(System.in);
        n1 = keyboard.nextInt( );
        n2 = keyboard.nextInt( );
        n3 = keyboard.nextInt( );
    sum = keyboard.nextInt(n1+n2+n3);
    product = keyboard.nextInt(n1*n2*n3);
       
        System.out.println("The sum of those three numbers is");
        System.out.println(sum/product);
      
}

}

Name: Anonymous 2006-08-31 2:30

>>1
I am really new at programming anything, and taking a java class.
I recommend not to start with an object-oriented language; nor  a bad language; nor a bloated language.

What is the information i input to divide the sum of 3 numbers by their product?
Think of what you need and what you provide. You need 3 numbers, so that's your input, and you provide their sum divided by their product (the whole result), i.e. a single number.

Name: Anonymous 2006-08-31 9:53

   sum = keyboard.nextInt(n1+n2+n3);
   product = keyboard.nextInt(n1*n2*n3);

What's keyboard.nextInt doing there?

Name: Anonymous 2006-09-01 19:17 (sage)

DO YOUR OWN HOMOWORK FAGGOT

Name: Anonymous 2007-09-12 0:27 ID:Heaven

[#]
[code]
sagedtest
[/code]

Name: Anonymous 2009-01-14 13:17

SICP

Name: Anonymous 2010-06-27 12:57

ur gay

Name: Anonymous 2010-06-27 13:52

my homework is to read the first chapter of SICP: Can someone do that for me please so I don't have to??

Name: Anonymous 2010-12-09 16:46

Name: Anonymous 2010-12-09 18:58

Name: Anonymous 2010-12-22 4:11

Name: Sgt.Kabu�Ĩkiman℄ᾡ 2012-05-28 20:21

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List