
/**
 *
 * perimeter of field calculation (corrected)
 *
 * Written by: Roger Garside
 *
 * First Written: 2/Oct/96
 * Last Rewritten: 2/Oct/96
 *
 */

import java.lancs.* ;

public class Chapter6n2a
    {

    /**
     *
     * main
     *
     */

    public static void main(String[] args) throws Exception
        {
        BasicIo.prompt("type the field length in feet: ") ;
        int length = BasicIo.readInteger() ;
        BasicIo.prompt("type the field breadth in feet: ") ;
        int breadth = BasicIo.readInteger() ;
        System.out.print("the perimeter of a field " + length + " feet by ") ;
        System.out.print(breadth + " feet is ") ;
        System.out.print(2 * (length + breadth)) ;
        System.out.println() ;
        } // end of method main

    } // end of class Chapter6n2a

