# Exercise - System.out.println(&amp;amp;quot;The value of...

This preview shows pages 1–2. Sign up to view the full content.

//import classes import java.util.*; import java.lang.*; import java.io.*; import java.text.*; import java.math.*; import java.text.DecimalFormat; i public class Exercise { static Scanner Console= new Scanner(System.in); public static void main(String[] args) { //variable declaration //executable Statements int SECRET=11; double RATE=12.50; int num1; int num2; int newNum; double wages, hoursworked; d String Name; S System.out.println("please enter two numbers and seperate with a space. Then press enter"); num1= Console.nextInt(); num2= Console.nextInt(); System.out.println("The value of num1 is " +num1);

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println(&quot;The value of num2 is &quot; +num2); newNum= (num1*2) + num2; System.out.println(&quot;The value of newNum is &quot; +newNum); newNum= SECRET + newNum; System.out.println(&quot; The Value of newNum1 is &quot; +newNum); S System.out.println(&quot;Enter last name&quot;); S Name= Console.next(); System.out.println(&quot;name&quot; +Name); System.out.println(&quot;Enter a number between 0 and 70. Then Press Enter.&quot;); hoursworked= Console.nextDouble(); h wages= RATE* hoursworked; System.out.println(&quot;The value of wages&quot;); S } } }...
View Full Document

## This note was uploaded on 06/17/2011 for the course COMPUTER S 2301 taught by Professor Staff during the Spring '11 term at Kennesaw.

### Page1 / 2

Exercise - System.out.println(&amp;amp;quot;The value of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online