Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner; //Import Scanner
- public class Live_Test_Java {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in); //Open Scanner
- //PART A
- /*
- int length, width, tiles;
- float cost, price;
- System.out.println("Enter Length:");
- length = input.nextInt();
- System.out.println("Enter Width:");
- width = input.nextInt();
- System.out.println("Enter Cost:");
- cost = input.nextFloat();
- tiles = length * width;
- System.out.println("Number of tiles: " + tiles);
- price = (float) tiles * cost;
- System.out.println("Cost of tiles: " + price);
- */
- //Part B
- /*
- int length, width, type, tiles;
- float cost, price;
- System.out.println("Enter Length:");
- length = input.nextInt();
- System.out.println("Enter Width:");
- width = input.nextInt();
- System.out.println("Enter type of tile:");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement