|
|
| Line 1: |
Line 1: |
| import java.util.Scanner;
| |
| public class Debug {
| |
|
| |
|
| public static void main(String[] args) {
| |
| System.out.println("Enter an integer");
| |
| Scanner s = new Scanner(System.in);
| |
| //this line should store the input in the variable x.
| |
| int x = s.nextInt();
| |
| //this line should add 5 to x.
| |
| x = x+5;
| |
| //this line should return the additive inverse of x
| |
| x = -1*Math.abs(x);
| |
| //this line should double the integer
| |
| x = Math.round(x/2);
| |
| //this line should print -2*(x+5).
| |
| System.out.println(x);
| |
| }
| |
|
| |
| }
| |
Latest revision as of 15:04, 2 April 2008
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Thumbnail | Dimensions | User | Comment |
| current | 15:09, 2 April 2008 |  | 720 × 540 (34 KB) | Jpcarter (talk | contribs) | |
| 21:54, 25 March 2008 |  | 720 × 540 (24 KB) | Jpcarter (talk | contribs) | |
You cannot overwrite this file.
File usage
There are no pages that use this file.
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.