7-3 Java-the floor space of the room in square feet
分数 10
全屏浏览
切换布局
作者 马新娟
单位 山东理工大学
Write a Java program that declares two variables of integer data type to represent the length and width of a room in feet. Assign appropriate values(6 and 7) to the variables and compute and display the floor space of the room in square feet. Do not display only a value as output but include explanatory text. Output should be displayed using console window.
输入格式:
输出格式:
The squre feet of the room is: 42
输入样例:
输出样例:
1The squre feet of the room is: 42
代码长度限制
16 KB
时间限制
400 ms
内存限制
64 MB
栈限制
8192 KB
public class Main { public static void main(String [] args) { int a=6; int b=7; int c=a*b; System.out.println("The squre feet of the room is: "+c); } }