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

Java help

Name: Anonymous 2011-09-23 3:11

Hey /prog/
Any Java coders here?
I need someone to write me a statement that prints out a user defined variable divided by 3.
If I do this, my friend will buy me Jimmie Johns. Help?
EDIT: I need this to be the full script.

Name: Anonymous 2011-09-23 4:12

import java.util.*;
public class Divide {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(true) {
            System.out.print("Enter a number: ");
            int x = sc.nextInt();
            System.out.println(x + "/3 = " + (x/3.0f));
        }
    }
}

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