Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class cpromF {
- public static void main(String [] args) {
- Scanner scn = new Scanner(System.in);
- int outerLength = scn.nextInt();
- int outerWidth = scn.nextInt();
- int innerLength = scn.nextInt();
- int innerWidth = scn.nextInt();
- int outerAreaFull = outerLength * outerWidth;
- int outerSubArea = 7 * (outerWidth - 3);
- int outerArea = outerAreaFull - outerSubArea;
- int areaInner = innerLength * innerWidth;
- int totalArea = outerArea - areaInner;
- System.out.print(outerArea +"\n" +areaInner +"\n" +totalArea);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement