Input three sets of data without using array

Assignment Help Basic Computer Science
Reference no: EM133234606

Write code which allows the user to input three sets of data without using an array. Create three different sets of variables for each of the data items you're trying to input. The variables will be:

lastName1, lastName2, lastName3

pubYear1, pubYear2, pubYear3

pubCity1, pubCity2, pubCity 3

Each of these variables need to obey the rules set up for the error trapping on them: last names are 32 characters or less, city names are 64 characters or less, and the publication year is in [1477, 2022]. You will then use a counter variable to determine which set of variables you're on to receive input. Use a switch statement on the counter in order to assign data to the correct set of variables; counter 0 should go to set 1, which will be lastNmae1, pubYear1, and pubCity1, as an example.

At the end of the input, ask the user if they want to input another. If the user replies "No", you will then print out what they have entered, based on the counter again. If the user says "Yes" and they have entered less than three sets, the counter increases and the entire entry process is looped back to execute again. If all three sets have been entered, the loop doesn't ask the user anything, it just immediately prints out the information it has.

in C language

Reference no: EM133234606

Questions Cloud

What is the validity of your certificate : What is the validity of your certificate (date range)? Do you have an intermediate certificate? If so, what is it?
Establish password aging attributes : Assign this user a password and establish password aging attributes so that this user cannot change their password within 4 days
All logical gates can be built from only nand gates : This is equivalent to saying that all propositional formulas can be built out of NAND operations such as A ?B.
Unsigned numbers and signed numbers in binary : What is the difference between unsigned numbers and signed numbers in binary?
Input three sets of data without using array : Write code which allows the user to input three sets of data without using an array.
Connection nodes labeled : How are the 5 connection nodes labeled (give an example)? How are the 50 connection nodes labeled?
Convert binary number to decimal number : Convert the Binary Number (Base 2) to a Decimal(Base 10) number.
Element into position two of array : Write the C++ program to insert an element into position two of an array. Your answer should include an explanation in your output.
Create script named generate : Create a script named generate-ssn.sh that generates all possible social security number and stores them into a file named ssn.txt.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the most dangerous hacker tool

What is the most dangerous hacker tool? From the news: How were NSA's hacker tools compromised? What do you think of hactivism?

  What does peer-reviewed means

What is the difference between publishing Journal Article and Book Chapter? What does peer-reviewed means? Identify 3 publishers that you would like to publish

  What is the utility of detached signature

What is the difference between RFC 5321 and RFC 5322? What are the SMTP and MIME standards? What is the utility of a detached signature?

  Formulate your brief for data presentation

Why is it so important to formulate your brief for a data presentation? Discuss some ways you would implement to formulate an effective brief.

  Array of doubles and the array length as parameters

Write function that takes an array of doubles and the array length as parameters (compute the array length using size of, don't just put in the number 5).

  What is the smallest possible y value

What is the smallest possible y value, and what experimental outcome gives this y value? What is the second smallest y value, and what outcome gives rise to it?

  Effective consumer relations important in health care

Why are effective consumer relations important in health care? How might consumer relations matter to you in current health care job or future health care job?

  Define cryptographic hash function

Define cryptographic hash function (CFH). List and define the main properties of an ideal cryptographic hash function.

  Organization and develop an information security strategy

The task is to carry out an information security risk assessment for an organization and develop an Information Security Strategy for that organization. This should include, at least:

  Leadership paradox and inter-team relations

What is the leadership paradox? What serious biases or misassumptions do groups that are involved in inter-team conflict sometimes experience?

  Challenges that caused the collapse of circuit

What were the issues and challenges that caused the collapse of Circuit City in 2009?

  What are some potential issues the team faces

Your company operates a single store outside Atlanta, Georgia, that sells nearly $50 million in maintenance, repair, and operations (MRO) supplies each year.

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