Computers & Programming Languages
Lesson1- Objectives Understand input statements Use input statements to solve problems
Think .. Guess .. Discuss
Program 1 Program 2
Program 1 Program 2
Import the scanner class from the library import java.util.Scanner; Steps for reading input from users Import the scanner class from the library import java.util.Scanner; Assign variable for the Scanner to read from the keyboard Scanner c1 = new Scanner (System.in); Read the input from keyboard h = c1 . nextInt(); w= c1.nextDouble();
Program Algorithm Start Read h,w Area = h * w Print area End
Activity in your book P-190
Book Activity Page 190 Create a java program that reads an integer number from the user then prints the square of this number?
Activity in your book P-191 Homework .. Please