public class Main {
public static void main(String[] args) {
int area = 2 * 3;
System.out.println("The area is : " + area);
}
}
NOTE:
- Used multiplication(*) operator to multiply.
- Didn't need Scanner class as input was already given.
- Used int because there was no decimal in the input.
No comments:
Post a Comment