Display message please enter your age in years to the user

Assignment Help Basic Computer Science
Reference no: EM131318641

Write a code segment that will analyze a numeric value provided by the user to determine if he or she is a newborn, a child, a teenager, or an adult. Make sure to include the following in your code: · Display the message "Please enter your age in years" to the user. · Use the ReadLine() method to obtain a value from the user. · Use the Parse() method to convert the user's value to an appropriate data type for numeric comparisons. · Check to be sure the user entered a value greater than or equal to 0 and less than or equal to 150. · Use ElseIf statements to determine the stage of life associated with the user's input. An input value of 0 indicates the user is a newborn. An input value of 1 up to but not including 13 is a child. An input value of 13 up to but not including 20 is a teenager. An input value of 20.0 or more is an adult.

Reference no: EM131318641

Questions Cloud

Return on the tangency portfolio : Suppose there are two risky assets, c and d, the tangency portfolio is 60% c and 40% d, and the expected return and standard deviation of the return on the tangency portfolio are 5% and 7%, respectively. Suppose also that the risk-free rate of ret..
Explain the consequences to swapfin : Explain the consequences to SwapFin if CPN defaults with and without closeout netting. Within your answer, explain what is meant by cherry picking.
Generate a random integer number between 20 and 100 : The program informs the user about the number of trials, the randomly generated number, and his status of success or failure to guess the number.
How the therapeutic relationship aligns with interpersonal : Summarize the fundamental elements of your theory of choice, including definitions of important terms, personality development, and major historical figures associated with the theory. Explain how your personal worldview (e.g. core beliefs about..
Display message please enter your age in years to the user : An input value of 1 up to but not including 13 is a child. An input value of 13 up to but not including 20 is a teenager. An input value of 20.0 or more is an adult.
Describe the strengths-weaknesses of the motivation theory : Using the readings provided or any other source, in three paragraphs describe the strengths and weaknesses of the motivation theory of Abraham H. Maslow, the Gestalt Approach of Fritz Perls or the client centered approach of Carl Rogers.The intern..
Determine which row has the largest sum : Print to the screen a string starting with "R" and then the number of the row with no spaces. For example, "R2".
Dealer engaging in derivatives transaction : Explain why end users, who conduct their risk management operations in the treasury department, should not require the treasury department to be a profit center ?
Which company you believe is winning the competition and why : Find a recent article or video describing the competition between two or more businesses. The competing businesses and the products they sell. Which company you believe is winning the competition and why?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Construct a pocket calculator

Construct a pocket calculator. Layout the LCD window and calculator buttons with a table and simulate the functions of the common calculator with onclick events on the buttons.

  Describe various types of dos attacks and techniques for pre

Describe various types of DoS attacks and techniques for preventingthem

  Relational database model

Why a database is called as relational database model?

  Implement your design with fltk and opengl

Notice that in this case the useful application internal state information (the center position of the line) and the drawing presentation requirements (end points of the line) do not coincide exactly. When defining the application state, we should..

  Nonattacking queens on the board

In the game of chess, a knight in row R and column C may move to row 1 ≤ Rt ≤ B and column 1 ≤ Ct ≤ B (where B is the size of the board) provided that either

  Forwarding table with a partially received lsdb

Explain why a router using link-state routing needs to receive the whole LSDB before creating and using its forwarding table. In other words, why can't the router create its forwarding table with a partially received LSDB?

  Pseudo code for a program that calculates the gown size

Draw the output and write pseudo code for a program that calculates the gown size that student need for graduation ceremony. The program accepts as input a student's height in feet and inches and weight in pounds and does so continuously until the..

  Program that uses the socket interface to send messages

Measure the throughput of TCP by sending 1 MB of data from one host to another. Do this in a loop that sends a message of some size, for example, 1024 iterations of a loop that sends 1-KB messages. Repeat the experiment with different message size..

  Do a lot more than calculations and reporting

Project managers do a lot more than calculations and reporting; they must keep the team on track, ensure ethical decisions are made, deal with conflict, and, depending on the type of organization, they may perform employee evaluations, issue bonuses,..

  Five gender-related characteristics

1. What are five gender-related characteristics in cognitive functioning and personality behavior that affect learning? 2. How does the environment versus heredity influence gender-specific approaches to learning?

  Same out of time on homework

if both boys been the same out of time on homework and reading this week wish boy gets more time playing video games? How do you know?

  Calculate portfolio new beta

The portfolio's beta is 1.20. Suppose you sell one of the stocks with a beta of .8 for $5,000 and use the proceeds to buy another stock whose beta is 1.6. Calculate your portfolio's new beta.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd