Hello world. Using input prompt for user to enter name

Added on - 22 Sep 2019

  • 4

    Pages

  • 511

    Words

  • 316

    Views

  • 0

    Downloads

Trusted by +2 million users,
1000+ happy students everyday
Showing pages 1 to 2 of 4 pages
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
desklib-logo
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document