Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class KnowlesPPP1
- {
- public static void main(String[] args)
- {
- PPP5();
- }
- public static void PPP1()
- {
- Scanner console = new Scanner(System.in);
- System.out.println("Please enter a single word.");
- String s = console.nextLine();
- for(int i = 0; i < s.length(); i++)
- {
- System.out.println(i + " " + s.charAt(i));
- }
- }
- public static void PPP2()
- {
- Scanner console = new Scanner(System.in);
- System.out.println("Please enter your email.");
- String email = console.nextLine();
- System.out.println("Please enter your email again to verify");
- String verify = console.nextLine();
- if(email.equals(verify))
- {
- System.out.println("That emails entered are a match!");
- }
- else
- {
- System.out.println("The emails entered don't match");
- }
- }
- public static void PPP3()
- {
- Scanner console = new Scanner(System.in);
- System.out.println("Please input the number of gallons");
- int gallons = console.nextInt();
- System.out.println("Pounds - " + gallons * 8.35);
- System.out.println("Cubic Feet - " + gallons * 0.13368);
- System.out.println("Cubic Meters - " + gallons / 264.17);
- }
- public static void PPP4()
- {
- Scanner console = new Scanner(System.in);
- System.out.println("On a scale of 0-100, what is your WiFi signal strength?");
- int strength = console.nextInt();
- if(strength < 0 || strength > 100)
- {
- System.out.println("Strength must be between 0 and 100!");
- return;
- }
- if(strength >= 0 && strength <= 25)
- {
- System.out.println("Signal: |");
- }
- if(strength >= 26 && strength <= 50)
- {
- System.out.println("Signal: ||");
- }
- if(strength >= 51 && strength <= 75)
- {
- System.out.println("Signal: |||");
- }
- if(strength >= 76 && strength <= 100)
- {
- System.out.println("Signal: ||||");
- }
- }
- public static void PPP5()
- {
- Scanner console = new Scanner(System.in);
- System.out.println("Enter the number of inches");
- int inches = console.nextInt();
- System.out.println("Centimeters - " + inches * 2.54);
- System.out.println("Meters - " + inches * 0.0254);
- System.out.println("Kilometers - " + inches * 0.0000254);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement