Skip to content

Instantly share code, notes, and snippets.

@connor-davis
Created March 7, 2022 12:22
Show Gist options
  • Save connor-davis/bc19a6e9323cfcbc3432db6eeaa80416 to your computer and use it in GitHub Desktop.
Save connor-davis/bc19a6e9323cfcbc3432db6eeaa80416 to your computer and use it in GitHub Desktop.
Room Code
/*
* Connor Davis
* @author ST10068305
*/
package room;
public class Room {
/**
* @param args The Command Line Arguments
*/
public static void main(String[] args) {
// Solve the problem
// declare the variables
int roomLength;
int roomBreadth;
int resultRoomArea;
// assign values to the variables
roomLength = 15;
roomBreadth = 25;
// calculate the floor space (area) of the room
resultRoomArea = roomLength * roomBreadth;
System.out.println("The floor space is " + resultRoomArea + " square feet.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment