Write a program that asks the user to answer some questions

Assignment Help Programming Languages
Reference no: EM13786461

Write a program that asks the user to answer some questions. First, you should ask the user if they want to load answers from a previously saved file. If they respond yes you should look for the file name of your choosing in the path of your choosing and try to load that. If no file was previously saved or they answered no, the user must answer 8 questions of your choosing. They can be simple (i.e. What is your favorite color?) or they can be difficult (i.e. When the zombie apocalypse comes would you sacrifice your friend for your own survival if need be?).

In your file you should save the questions and the answers on the same line so it will look like this:

What is your favorite color? Blue

How old are you? 25

By doing this we can read in an entire line and simply separate the question based on the location of the question mark, anything before it and including it is the question and anything after it is the answer.

If the user wants to load previous questions and the file exists you should print out the question on one line and the answer on another

Reference no: EM13786461

Questions Cloud

Minimize ethical concerns related to social activities : Travon is the lead counselor in a small clinic. Elliot has worked there for a few years and reports to Travon. Travon completes Elliot's yearly evaluation and oversees his work. Although Travon is the supervisor, Elliot is actually three years old..
How crimes are measured : How Crimes are Measured. Utilize FBI Uniform Crime Report data and select one offense, such as burglary, in two metropolitan areas
How does an editor differ from a peer reviewer : How does an editor differ from a peer reviewer? Use at least two points to support your response. Based on this information, explain whether your article for this week was peer reviewed?
Welfare programs and policies in the american human services : what would we do without them? Consider the effectiveness of policies for social security benefits, medical care, and food vouchers.
Write a program that asks the user to answer some questions : Write a program that asks the user to answer some questions. First, you should ask the user if they want to load answers from a previously saved file. If they respond yes you should look for the file name of your choosing in the path of your choos..
Review of the ebook electures and animated examples : Give us your review of the eBook, eLectures, and Animated Example Exercises. Tell us the pros and cons of these items
Demand for liquidity means demand : An investor willing to forgo FDIC insurance and unwilling to risk loss of principal could invest - Demand for liquidity means demand
Regard to equal employment opportunity : What is the role of each branch of the federal government with regard to equal employment opportunity? For each of the following situations, identify one or more constitutional amendments, laws, or executive orders that might be apply. For each situa..
Comparison of companies to adopt cloud computing : Comparison of companies to adopt cloud computing

Reviews

Write a Review

Programming Languages Questions & Answers

  Program instantiates four dates and allots invalid values

Demonstration program instantiates four Dates and purposely allots invalid values to some of arguments; class methods will correct invalid values.

  Program for sentinel address of all zeros and nickname

Explain class called address_t with members for four integers and must read list up to 100 addresses and nicknames terminated by sentinel address of all zeros and nickname.

  Write a program that generates all the factors of a number

Write a program that generates all the factors of a number entered by the user. For instance, the number 12 has the factors 2 * 2 * 3.

  Write unix shell script to check file in current directory

Write Unix shell script (one program) called Project1_lastname (your lastname). This script will do the following tasks: Using "if" statement checks for a file called "student.txt" in current directory.

  Program to display employees-total hours in decreasing order

The following array stores work hours for eight employees, write program which display employees and their total hours in decreasing order of total hours.

  Create object-oriented design to enter name into text box

Create the object-oriented design for the system which permits the user to enter their name into the text box. When they press Go button message.

  Write program to establish two savings accounts

Write program which establishes two savings accounts with saver1 having account number 10002 with initial balance of $2,000, and saver2 having account 10003 with initial balance of $3,000.

  Write program which translate letter grade into number grade

Write program which translates a letter grade into number grade. Letter grades are A, B, C, D, F, possibly followed by + or -.

  Create a print stream object using dos

Create a PrintStream object using dos and assign the resulting reference to ps, a PrintStream variable that has already been declared.

  Explain usability and accessibility in site design

A description of content to be included in site and how this content will be acquired. Attention should be given to copyright restrictions.

  Design a program that calculate the percentage

You have been asked to design a program that will allow a teacher to calculate the percentage and the final grade for students in a class

  Find number values that are between given range

Suppose the values from aaa.txt have been loaded into array Bob: find out the number values in Bob that are between 0 and 4 (not inclusive).

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