Guys I have a test right now and I haven't studied. Please help me out?
heres the question:
write a program that reads information for 3 students. The information to be read is Name, Id and total mark. The mark is out of 100. The program calculates the average mark and prints out the information and the average. In the last 4 lines the data should be aligned correctly, the marks and the average should be printed with two decimals.
Sample:
enter student information
Name? Ben
ID? 2088374
Mark? 90
Enter second student information
Name? John
ID? 1231231
Mark?89
Enter third student information
Name? Alex
ID? 1231241
Mark?69
Ben 123123123 90
John 12312312 89
Alex 12312333 69
The average mark is: 74.67
Exercise 2:
modify the program written in exercise 1 so that you read the student information from the file info.txt and save the output in output.txt They should look like this:
Input:
Ben 123123123 90
John 123123123 75
Alex 1231233 69
Output:
Ben 123123123 90
John 123123123 75
Alex 123123123 59
The average mark is: 74.67
Hehe, I think I must have missed the question..What was the question again? I am not a great programmer but i am a google master..If I knew what you was asking.
here is a good out "My dog ate my computer" that always works for me ;)
Considering how many tutors/lecturers we have out there that seem incompetent. I wonder if anyone has ever truly believed something like that. Unless of course you have something like what I once had - a rabbit chew all your computer cables. Still wasn't a valid excuse :)