Analyze a numeric value provided by the user

Assignment Help Basic Computer Science
Reference no: EM131349044

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: EM131349044

Questions Cloud

Write a five page research paper about humility : Write a research paper 3-5 page about HUMILITY. I want atlest 4 references no more of em from the internet.
Desirable for a structure chart : Question 2: Why is it desirable for a structure chart to be highly cohesive and loosely coupled?
Write a paper about race inequality and class difference : Write a paper about Race inequality, and class difference. Main argument: Race inequality issue is not independent from social class difference, there is an interrelationship between race and class.
Attached to webpage development : HTML is usually attached to webpage development, giving instructions to a web browser on how to display the webpage, how does it work with mobile development?
Analyze a numeric value provided by the user : 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:
Problem regarding the technological breakthroughs : Of all the technological breakthroughs since 2000, which will have the most influence on the next ten years of your life? Please answer this question in two phases; first, deal with life around you and, second, focus directly on the life of you an..
Why are so many people victims of cybercrime : What motivated Jack the Ripper? What has caused the rise of ISIS? Why do some Americans think immigrants are more likely to commit crimes than native born Americans? Why are so many people victims of cybercrime?
Bachelor of science in information technology program : As one of the requirements for the Bachelor of Science in Information Technology program, you must design and develop a computer program using professional principles and standards.
Define and argue a business case to justify a new product : Assessment Task: Marketing Report - Briefly analyse the external and internal environments (SWOT) and Identify a relevant strength, opportunity - Identify and describe a target market - Develop a suitable new product for the company to introduce for ..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the paintcomponent method

Describe the types of information available to a program when using the KeyListener interface.

  Determine the maximum possible value for the first player

Then two players take turns picking a coin from the sequence, but can only pick the first or the last coin of the (remaining) sequence. The goal is to collect coins of the largest total value. For this problem, n is even.

  Formulate and find the equilibrium probabilities

When there are three or more, another server is employed, so that the service rate is increased to 2µ. Formulate and find the equilibrium probabilities.

  Display an aquarium ph level

Write an application that will enable you to display an aquarium's pH level. The pH is a measure of the aquarium water's alkalinity and is typically given on a 0-14 scale. For most freshwater fish tanks, 7 is neutral.

  General overview of the company

Create a case study summary of the company you have chosen, including a general overview of the company, its external environment, and a list of its current strategies and objectives.

  Gantt and pert charts

Set property values to denote progress in at least fifteen (15) of the line items. Set properties so that at least one (1) of the main tasks is behind schedule.

  Expect the p-values to have a uniform distribution

If the signal strengths are roughly normal, then we expect the p-values to have a uniform distribution. This leads to about 5% of the p-values for the 8000 tests to fall below 0.05.

  Chief information officer for a large organization

As a Chief Information Officer for a large organization, compare and contrast three of the five main management processes described in Chapter 5 of Kerzner's text. Suggest one strategy to apply the business value of each selected management proces..

  Write a program that checks whether the graph is cyclic

Let's have as given a graph G(V, E) and two of its vertices x and y. Write a program that finds the shortest path between two vertices measured in number of vertices staying on the path.

  Compute the power absorbed by the inductor

For the circuit shown in Figure P4.40(a) , the current i ( t ) is shown in Figure P4.40(b) .

  Differences between the two programming languages

What are the differences between C and C++? List the major differences between the two programming languages.

  The marketing plan guide

This assignment represents Section 2 of the Marketing Plan. Use the Marketing Plan guide to identify the sections of the Marketing Plan and the marketing elements contained therein. This assignment will focus on Section 2 - Marketing Research & Ta..

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