Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SeriesCalculator_01 {
- public static void main(String[] args) {
- Scanner myScan = new Scanner(System.in);
- String movieTitle = myScan.nextLine();
- int seasonsCount = Integer.parseInt(myScan.nextLine());
- int episodesCount = Integer.parseInt(myScan.nextLine());
- double episodeLength = Double.parseDouble(myScan.nextLine());
- double totalEpisodeLength = episodeLength * 1.20;
- double additionalTimeSpecial = seasonsCount * 10;
- double totalTime = totalEpisodeLength * episodesCount * seasonsCount + additionalTimeSpecial;
- System.out.printf("Total time needed to watch the %s series is %.0f minutes.", movieTitle, Math.floor(totalTime));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement