Advertisement
veronikaaa86

07. Projects Creation

May 13th, 2023
644
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class ProjectsCreation {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         String name = scanner.nextLine();
  10.         int countProjects = Integer.parseInt(scanner.nextLine());
  11.  
  12.         //The architect George will need 12 hours to complete 4 project/s.
  13.         int hoursForOneProject = 3;
  14.  
  15.         int totalHours = countProjects * hoursForOneProject;
  16.  
  17.         System.out.printf("The architect %s will need %d hours to complete %d project/s.", name, totalHours, countProjects);
  18.     }
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement