logo

Hello world. Using input prompt for user to enter name

   

Added on  2019-09-22

4 Pages511 Words599 Views
Hello worldUsing input prompt for user to enter nameThen display"Hello, xxxxxx, How are you?wherexxxxxis the user's nameFor example, if user entersMary, the program will display:Hello Mary, how are you?Be sure to fill out author and dateAdd, subtract, multiply, divideUse input to prompt for two integernumbers.Thenadd the numberssubtract the numbersmultiply the numbersdivide the numbersSo, if the user enters 1 and 2, you would get:Numbers added 3Numbers subtracted -1Numbers multiplied 2Numbers divided 0.5Be sure to fill out author and dateBe sure to separate input from calculation from output

Days and hoursUsing input, prompt for an integernumber of hoursThe display how many daysand how many hours that isFor example, if the user enters 47,you would get:That is 1 days and 23 hoursif the user enters 49,you would get:That is 2 days and 1 hoursBe sure to fill out author and dateBe sure to separate input from calculation from outputTicket PriceUsing input, prompt for floating pointprice per ticketThen use input to prompt for two integers:number of tickets on day 1number of tickets on day 2So if the user enters10.5 for price per ticket12 for number of tickets on day 113 for number of tickets for day 2you will displayTotal ticket price is 262.5Be sure to fill out author and dateBe sure to separate input from calculation from output

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Java program for Fraction class, String and Date array, One Dimensional Array and Fantasy Football
|26
|6874
|98

IPO Chart: Input Phone Number Process
|5
|626
|376

CS 260 Homework 5: Payroll with SortedList and Validation
|2
|587
|184

System Analysis and Design Assignment JHC
|12
|2024
|77

Assignment on Programming Using Java
|11
|2914
|439