subject

Write a program that allows the user to type in any one-line question and then answers that question. The program will not really pay any attention to the question, but will simply read the question line and discard all that it reads. It always gives one of the following answers:I'm not sure, but I think you will find the answer in Chapter #N.
That's a good question.
If I were you, I would not worry about such things.
That question has puzzled philosophers for centuries.
I don't know. I'm just a machine.
Think about it and the answer will come to you.
I used to know the answer to that question, but I've forgotten it.
The answer can be found in a secret place in the woods.
These answers are stored in a file (one answer per line), and your program simply reads the next answer from the file and writes it out to the console as the answer to the question. After your program has read the entire file, it simply closes the file, reopens the file, and starts down the list of answers again.
Whenever your program outputs the first answer, it should replace the two symbols #N with a random number between 1 and 18 (including the possibility of 1 and 18). In order to choose a random number between 1 and 18, your program should call the rand() function (remember to call srand() at the beginning of the program to seed the rand() function). Also, have the program prompt the user for the name of the answer file.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
What is the most popular genre of video games?
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Quick pl which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 24.06.2019 01:10
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates.json” file), in order of closest-to-farthest from the origin.
Answers: 1
You know the right answer?
Write a program that allows the user to type in any one-line question and then answers that question...
Questions
question
English, 13.10.2020 02:01
Questions on the website: 13722367