Bartleby Sitemap - Textbook Solutions

All Textbook Solutions for Computer Science: A Structured Programming Approach Using C, Third Edition

18PS19PS20PS21PS22PS23PS24PS25PS26PS27PS28PS29PS30PS31PS32PS33PS34PS35PS36PS37PS38PS39PS40PS41PS42PS43PS44PS45PS46PS47PS1PS2PS3PS4PS5PS6PS7PS8PS9PS10PS11PS12PS13PS14PS15PS16PS17PS18PS19PS20PS21PS22PS23PS24PS25PS26PS27PS28PS29PS30PSAn international standard book number (ISBN) is used to uniquely identify a book. It is made of 10 digits, as shown in Figure 8-44. Write a function that tests an ISBN to see if it is valid. For an ISBN number to be valid, the weighted sum of the 10 digits must be evenly divisible by 11. The tenth digit may be x, which indicates 10. To determine the weighted sum, the value of each position is multiplied by its relative position, starting from the right, and the sum of the products is determined. The calculation of the weighted sum for the ISBN shown above is demonstrated in Table 8-5. Since the weighted sum modulus 11 is 0, the ISBN number is valid. Test your function with the above example, the ISBN number for this text (see the copyright page), and 0-08-781809-5 (an invalid ISBN—the third and fourth digits are reversed).32PS33PS34PS35PS36PS37PS38PS39PS40PS41PS42PS43PS44PS45PS46PS47PS48PS49PS50PS51PS52PS53PS54PS55PS56PS1PS2PS3PS4PS5PS6PS7PS8PS9PS10PS11PS12PS13PS14PS15PS16PS17PS18PS19PS20PS21PS22PS23PS24PS25PS26PS27PS28PS29PS30PS31PS32PS33PS34PS35PS36PS37PS38PS39PS40PS1PS2PS3PS4PS5PS6PS7PS8PS9PS10PS11PS12PS13PS14PS15PS16PS17PS18PS19PS20PS21PS22PS23PS24PS25PS26PS27PS28PS29PS30PS31PS32PS33PS34PS35PS36PS37PS38PS39PS40PS41PS42PS43PS44PS45PS46PS47PS48PS49PS50PS51PS52PS1PS2PS3PS4PS5PS6PS7PS8PS9PS10PS11PS12PS13PS14PS15PS16PS17PS18PS19PS20PS21PS22PS23PS24PS25PS26PS27PS28PS29PS30PS31PS32PS33PS34PS35PS36PS37PS38PS39PS40PS41PS42PS43PS44PS45PS1PS2PS3PS4PS5PS6PS7PS8PS9PS10PS11PS12PS13PS14PS15PS16PS17PS18PS19PS20PS21PS22PS23PS24PS25PS26PS27PS28PS29PS30PS31PS32PS33PS34PS35PS36PS37PSWrite a program to keep records and perform statistical analysis for a class of students. For each student, we need a name of up to 20 characters, an ID for four digits, four quizzes, and one examination. The student data will be stored in an array of student structures. Provide for up to 50 students. The input is read from a text file. Each line in the file contains a student's name, four quiz scores, and one examination score in order. If a quiz or examination was not taken, the score is zero. The student's name, the quiz scores, and the examination score are all separated from each other by one or more spaces. A new line ends the data for one student. The number of lines in this file is the same as the number of students. The output consists of a listing of the students in the order they are read from the file; no sorting is required. Print each student on a separate line with an appropriate caption for each column. After the last student, print the highest, lowest, and average score for each quiz and the examination. In determining the lowest score, do not consider zero scores. A suggested report layout is shown in Table 12-1.39PS40PS41PS42PS43PS44PS1PS2PS3PS4PS5PS6PS7PS8PS9PS10PS11PS12PS13PS14PS15PS16PS17PSGiven the following declarations and assuming that the file is open: FILEsp;chars[20]; Find any error in each of the following statements: a.freads,20,sp;b.freads,20,1,sp;c.freads,1,20,sp;d.freadsp,1,20,s;e.freadsp,20,1,s;19PS20PS21PS22PS23PS24PS25PS26PS27PS28PS29PS30PS31PS32PS33PS
Page: [1][2][3]