Suppose that the file inData.txt contains the following data:
Randy Gill 31
The numbers in the first line represent the length and width, respectively, of a rectangle. The number in the second line represents the radius of a circle. The third line contains the first name, last name, and the age of a person. The first number in the fourth line is the savings account balance at the beginning of the month and the second number is the interest rate per year. (Assume pi=3.1416) The fifth line contains an uppercase letter between A and Y(inclusive). Write statements so that after the program executes, the contents of the file outData.txt are as shown below. If neccessary declare additional variable. Your statements should be general enough so that if the content of the infput file changes and the program is run again(without editing and recompiling), it outputs the appropriate results.
Length= 10.20, width= 5.35, area= 54.57, parameter = 31.10
Radius =15.60, area=764.54, circumference = 98.02
Name: Randy Gill age:31
Beginning balance = $18500.00, interest rate = 3.50
Balance at the end of the month = 18553.96
The characeter that comes after A in the ASCII set is B
Now after reading this more the once and even typing it here, I have no clue as to what the heck I should be doing. The step before this one asked me to open both the inData.txt file and the outData.txt file which I did using this code.
Can someone please put this into simpler terms for me, in other words please dumb it down for me.
This post has been edited by asharp03: 01 February 2010 - 02:18 PM