SHARE
TWEET

Untitled

a guest Oct 20th, 2017 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Vandeninis {
  4.  
  5.     public static void main(String[] args) {
  6.     Scanner sc = new Scanner(System.in);
  7.        
  8.     int v1, v2, v, m, vv, vm, p;
  9.    
  10.    
  11.     System.out.print("Kada pradejo daryti pietus ? ");
  12.     v = sc.nextInt();  
  13.     m = sc.nextInt();
  14.     System.out.print("Per kiek laiko pagamina pietus ?  ");
  15.     p = sc.nextInt();  
  16.     System.out.print("Kada grizta vaikai ? "); 
  17.     vv = sc.nextInt();
  18.     vm = sc.nextInt();
  19.     v1 = v * 60 + m;
  20.     v2 = vv * 60 + vm;
  21.    
  22.     if(v1 + p > v2) {
  23.     System.out.print("Motina Nespes padaryti pietu");
  24.     }
  25.     else if(v1 + p < v2) {
  26.     System.out.print("Motina spes padaryti pietus");
  27.     }
  28.     }
  29.  
  30. }
RAW Paste Data
Top