Advertisement
myrdok123

07. Projects Creation

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