Advertisement
stoyanoff

SeriesCalculator_01

Jul 17th, 2020
727
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class SeriesCalculator_01 {
  4.     public static void main(String[] args) {
  5.         Scanner myScan = new Scanner(System.in);
  6.  
  7.         String movieTitle = myScan.nextLine();
  8.         int seasonsCount = Integer.parseInt(myScan.nextLine());
  9.         int episodesCount = Integer.parseInt(myScan.nextLine());
  10.         double episodeLength = Double.parseDouble(myScan.nextLine());
  11.  
  12.         double totalEpisodeLength = episodeLength * 1.20;
  13.         double additionalTimeSpecial = seasonsCount * 10;
  14.  
  15.         double totalTime = totalEpisodeLength * episodesCount * seasonsCount + additionalTimeSpecial;
  16.  
  17.         System.out.printf("Total time needed to watch the %s series is %.0f minutes.", movieTitle, Math.floor(totalTime));
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement