Advertisement
Belikov_Vladislav

Untitled

Feb 25th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. public class Main {
  2. /**
  3.  *
  4.  * @param args
  5.  */
  6.     public static void main(String[] args) {
  7.         // TODO Auto-generated method stub
  8.         Scanner sc = new Scanner(System.in);
  9.         Sotr [] sotr = new Sotr[sc.nextInt()];
  10.         for(int i = 0; i < sotr.length; i++){
  11.             sotr[i] = new Sotr();
  12.             sotr[i].fio = sc.nextLine();
  13.             sotr[i].tabNumber = sc.nextLine();
  14.             sotr[i].countHours = sc.nextInt();
  15.             sotr[i].rate = sc.nextInt();
  16.         }
  17.         for(int i = 0; i < sotr.length; i++){
  18.             System.out.println(sotr[i].fio+"\t"+(sotr[i].countHours*sotr[i].rate));
  19.         }
  20.        
  21.        
  22.        
  23.  
  24.     }
  25.     private static class Sotr{
  26.         String fio, tabNumber;
  27.         int countHours, rate;
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement