Exercise - System.out.println("The value of...

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

View Full Document Right Arrow Icon
//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);
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println("The value of num2 is " +num2); newNum= (num1*2) + num2; System.out.println("The value of newNum is " +newNum); newNum= SECRET + newNum; System.out.println(" The Value of newNum1 is " +newNum); S System.out.println("Enter last name"); S Name= Console.next(); System.out.println("name" +Name); System.out.println("Enter a number between 0 and 70. Then Press Enter."); hoursworked= Console.nextDouble(); h wages= RATE* hoursworked; System.out.println("The value of wages"); 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("The value of...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online