Advertisement
blackpab

Lab1_z4

Feb 21st, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package srednia44;
  7. import java.util.Scanner;
  8.  
  9. /**
  10.  *
  11.  * @author student
  12.  */
  13. public class Srednia44 {
  14.  
  15.     /**
  16.      * @param args the command line arguments
  17.      */
  18.     public static void main(String[] args) {
  19.         // TODO code application logic here
  20.        
  21.         Scanner sc = new Scanner(System.in);
  22.         System.out.println("Podaj a:");
  23.         int a = sc.nextInt();
  24.         System.out.println("Podaj b:");
  25.         int b = sc.nextInt();
  26.         System.out.println("Sednia wynosi: " + (a*b)/2);  
  27.     }  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement