Putting validation into a function

Assignment Help C/C++ Programming
Reference no: EM133201468

Program 1

Ask the user for their initials and save them into a char array. Then, ask the user for their age, and save it in an integer. Make sure that your age input is validated so that only numeric data will be accepted. HINT: Putting this validation into a function (aka method) will be helpful for other numeric inputs in this lab. Multiply the age by 365 to get the days that they've been alive (we don't care about leap years, they're worthless). Finally, display everything back to the user.

Example Output

Please enter your initials: TJ

Please enter your age: 999

TJ, did you know you're at least 364635 days old?

Reference no: EM133201468

Questions Cloud

Which of the two methods of estimating uncollectible provide : Which of the two methods of estimating uncollectible provides for the most accurate estimate of the current net realizable value of the receivables?
Define the term co-insurance : Define the term "co-insurance." Where does co-insurance apply within your coverage? How does co-insurance differ from co-pay
What will be the result : LAW 101 Saudi electronic university - How could this dispute have been avoided in the first place - dispute over the profits arises, and ultimately a court
Discuss what a marketing plan is : Discuss what a marketing plan is and describe the different components of the marketing plan in your own words (see figure 16.2 in the text).
Putting validation into a function : Ask the user for their initials and save them into a char array. Then, ask the user for their age, and save it in an integer. Make sure that your age input is v
Impact of technology in emergency management : Northcentral University - describe three new technologies that have greatly assisted emergency managers in the last 5 years. Consider emerging technologies
Complete your Gemba Walk and document your observations : Complete your Gemba Walk and document your observations. Write a 4- to 6-page report on your observations of your Gemba
Monitoring the admissions to clinic : A hospital ER manager has been monitoring the admissions to her clinic over the course of a week. The data she collected is found in the clinic.csv file in your
Create the dream team without boundaries : With all these wonderful components there are many issues and might have a large negative impact to the whole process of creating a virtual team and working

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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