HarrJ

nrg2024b2 Day 05

Jun 24th, 2024 (edited)
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.13 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Day05C {
  4.     public static void main(String[] args) {
  5.         Scanner sc = new Scanner(System.in);
  6.         String courseName, strand, tvi;
  7.         int hoursTaken;
  8.        
  9.         System.out.println("Enter Course Name: ");
  10.         courseName = sc.nextLine();
  11.        
  12.         System.out.println("Enter hours of training: ");
  13.         hoursTaken = sc.nextInt();
  14.        
  15.         sc.nextLine();// sasalo ito ng skip ng nextInt()
  16.         System.out.println("Enter strand: ");
  17.         strand = sc.nextLine();
  18.        
  19.         System.out.println("Enter TVI that caters: ");
  20.         tvi = sc.nextLine();
  21.        
  22.         System.out.println("======");
  23.         System.out.println("The " + courseName + " course "
  24.                 + " of " + strand + " strand takes "
  25.             + hoursTaken + " hours / " + (hoursTaken/8) + " days to complete");
  26.         System.out.println("A TVI that have this course is: " + tvi);
  27.  
  28. // Paano kung ganito dapat ang user input:
  29. // Enter Course Name: ______
  30. // Enter hours of training: ______
  31. // Enter strand: ______
  32. // Enter TVI that caters: ______
  33.     }
  34. }
  35.  
Advertisement
Add Comment
Please, Sign In to add comment