/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package lab.pkg5;
/**
*
* @author User
*/
import java.util.Scanner;
public class Lab5 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int a, b, S = 0;
System.out.println("Подсчет площади прямоугольника");
System.out.println("Введите ширину");
Scanner scn = new Scanner(System.in);
a = scn.nextInt();
System.out.println("Введите высоту");
b = scn.nextInt();
S = count(S, a, b);
System.out.println("Площадь прямоугольника=" +S);
}
public static int count(int S, int a ,int b) {
S = a * b;
return S;
}
}
// TODO code application logic here