Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * 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 dz23;
- public class DZ23 {
- // 2) Создать новый проект
- //Создать метод, который вычисляет произведение 4 чисел (значений типа int) - параметров метода.
- //Метод должен возвращать значение типа int.
- //Вызвать данный метод в методе main и вывести результат на экран.
- public static int mult(int a, int b, int c, int d){
- int result = a * b * c * d;
- return result;
- }
- //
- public static void main(String[] args) {
- // TODO code application logic here
- // вызов метода mult
- int res = mult(2, 2, 3, 4);
- System.out.println("res=" + res);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement