Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Lesson 6 - Unit 1 - Output in Java
- */
- import java.io.*;
- import static java.lang.System.*;
- import java.util.Scanner;
- class Lesson_6_Activity_Three{
- public static void main (String str[]) throws IOException {
- Scanner scan = new Scanner (System.in);
- System.out.println("Please input a decimal number:");
- double x = scan.nextDouble();
- System.out.println("Answer: " + ((int)((x - (int)x)*100)));
- scan.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement