I am in a C++ class and one of the assignments is going to be below. I have read through the chapter and gone over the lecture and I am still having problems. If someone could explain this to me it would be greatly appreciated. Ok here is the assignment.
Create a text file with a letter on the first line, and two double-digit numbers on the second line. Write a program using fstream that reads in your text file, creates variables to manipulate that input and outputs the following results to a different text file:
"The ASCII value of your character: " __ " is " ____"
(you will need to cast from a char to an int)
"The sum of " ___ " and " _____ " = " _____ "
(add the two numbers, display both the numbers and final result)
"The product of " ___ " and " _____ " = " _____"
(multiply the two numbers, display both the numbers and final result)
Remember to comment your code to explain what you are doing, and remember to close both the input and output file when you are done manipulating them.
I'm not asking for the answer. Would just like someone to explain it to me so that I can do it.



LinkBack URL
About LinkBacks


