Preview

Chapter 8 programming problems

Satisfactory Essays
Open Document
Open Document
194 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Chapter 8 programming problems
Problem 1:Input names of students from the user, terminated by ZZZ, andcreate a data file GRADES with records of the form:student (string), test1 (integer), test2 (integer), test3 (integer)In this file, all test scores should be set equal to 0.
Main Program
Open GRADES
Declare Name as String
Call Write Grades Module
Close GRADES
End Main Module

Write Grades Module

Display "Enter Student's Name, ZZZ to quit”
Input Name
While Name <> "ZZZ"
Write Name to GRADES
Write "0 0 0" to GRADES
Write newline to GRADES
Input Name
End WhileEnd Write Grades Module
Problem 2:Display the contents of the file GRADES created in Problem 1.Each student's record should appear on a separate line and includethe total score (the sum of the three tests) for that student. Forexample, a line of output might be:R. Abrams 76 84 82 242
Main Program
Declare Score1, Score2, Score3 as Integers
Declare Name as String
Open GRADES
Call Display Grades Module
Close GRADES
End Main Module
Display Grades Module
Read Name from GRADES
Read Score1 from GRADES
Read Score2 from GRADES
Read Score3 from GRADES
Declare Sum as Integer
Sum = Score1+Score2+Score3
Display Name, Score1, Score2, Score3, Sum
Write newline
End Display Grades Module

You May Also Find These Documents Helpful

  • Satisfactory Essays

    This week learning assignment is based on Unit 8 Chapter 6 reading of the textbook about the elements of a computing system that focus on the selections relevant for supporting programs with symbols.…

    • 288 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Nt1310 Unit 8 Assignment 1

    • 1415 Words
    • 6 Pages

    This project used an Atmega644 microcontroller clocked at 20MHz in each of the two functional modules for processing. Memory storage is provided by a standard Secure Digital (SD) card. Xbee modules provide bidirectional wireless communication and we use the TLV5616 DAC chip for generating analog audio. The LM358 dual op amp provides active filtering to the output of the DAC. Music files can be added to the SD card using any computer with a multimedia card reader. Once the base station detects an SD card inserted into the holder, it awaits data requests from the portable module. The portable module requests data when required and feeds these values into the DAC. The DAC output is low-pass filtered by the op amp, which also buffers the DAC output before it reaches the audio output…

    • 1415 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    The problematic scenario is when the physical sequence has a loop. In this scenario, a switch which is attached to the middlebox literally cannot identify the middlebox segment based on the combination of the input interface and packet header fields. To address this scenario, SIMPLE introduce a ProcState tag that encodes the packet’s processing state inside the packet header fields using either VLAN tags, unused fields in the IP headers i.e., IP ToS fields or MPLS labels depending on the fields supported in the SDN-enabled switches. Therefore, SDN controller installs tag addition forwarding rules at the first switch of each middlebox segment, which is based on packet header fields and input ports of the switch. In addition, downstream switches consider these tags for the matching purpose and perform respective forwarding action. This process continues until the middlebox segment is finished.…

    • 241 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    Int1 114.1.1 Task 3

    • 2000 Words
    • 8 Pages

    After researching, I found two studies that are similar to my experiment. One study by Sean Boyd (2007) tested to see which brand of microwave popcorn yielded the least amount of un-popped kernels. Mr. Boyd tested five brands of butter flavored microwave popcorn: Aldi, Act II, Orville Redenbacher, Jolley Time and Pop-Secret. His experiment proved his hypothesis partially wrong. Mr. Boyd hypothesized that Orville Redenbacher would be the best and Aldi's would be the worst. His experiment proved that Act II produced the least amount of un-popped kernels while Aldi's did have the most un-popped kernels on average.…

    • 2000 Words
    • 8 Pages
    Good Essays
  • Better Essays

    Please complete the following 7 exercises below in either Excel or a word document (but must be single document). You must show your work where appropriate (leaving the calculations within Excel cells is acceptable). Save the document, and submit it in the appropriate week using the Assignment Submission button.…

    • 971 Words
    • 4 Pages
    Better Essays
  • Powerful Essays

    COM 100 Exam 1

    • 1961 Words
    • 9 Pages

    You will have 60 minutes to complete the exam from the time it is distributed. You will have ample time to read each test item carefully and respond to each test item thoughtfully. Test items are not intended to be tricky, but rather to assess the depth of your understanding.…

    • 1961 Words
    • 9 Pages
    Powerful Essays
  • Powerful Essays

    what ever

    • 1175 Words
    • 5 Pages

    Be sure your output file contains user prompts and what was entered by the user .in addition to the results of your program processing. Run with above listed data. The instructor will give you additional data to test.…

    • 1175 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    Psychology Assignment

    • 1556 Words
    • 7 Pages

    10. College XYZ wants to collect information from students concerning a plus/minus grading system (the college administration wants to add minus grades to the plus values…

    • 1556 Words
    • 7 Pages
    Good Essays
  • Good Essays

    Algorithms and Flowcharts

    • 738 Words
    • 3 Pages

    50 Students in a class appeared in their final examination. Their mark sheets have been given to you. The division column of the mark sheet contain the division (FIRST, SECOND, THIRD or FAIL) obtained by the student. Write an algorithm to calculate and print the total number of students who passed in FIRST division.…

    • 738 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT STUDENT-FILE ASSIGN TO STUDENT. SELECT STUDENT-REPORT ASSIGN TO STDREPT. DATA DIVISION. FILE SECTION. FD STUDENT-FILE LABEL RECORDS ARE OMITTED RECORD CONTAINS 80 CHARACTERS RECORDING MODE IS F. 01 STUDENT-REC-IN.…

    • 756 Words
    • 4 Pages
    Satisfactory Essays
  • Better Essays

    IF STATEMENT SAMPLE 1 <?php $studentId = 'A1110601'; if ( $studentId == 'A1110601' ) { echo ' Student ID: '.$studentId. '<br/>'. ' Welcome! Inah Ysabela Marie D. Alegre'; } ?> SAMPLE 2 <?php $birthdate = 'April 8, 1995';…

    • 989 Words
    • 4 Pages
    Better Essays
  • Better Essays

    printf("\n\n\t\tREAD THE FOLLOWING RULES CAREFULLY\n\n\n1.THE EXAMINATION IS FOR 3 SUBJECTS: PHYSICS, CHEMISTRY, MATHEMATICS\n\n2.EACH SUBJECT HAS 10 QUESTIONS EACH\n\n3.THE QUESTIONS ARE OF MULTIPLE CHOICE TYPE WITH 4 OPTIONS A, B, C, D OUT OF WHICH ONLY ONE IS APPROPRIATE\n\n4.+4 MARKS FOR EVERY CORRECT ANSWER AND A PENALTY OF -1 MARKS WILL BE AWARDED FOR EACH WRONG ANSWER\n\n5.YOU ARE ALLOWED TO QUIT ANYTIME IN BETWEEN BY PRESSING 'Q' ON THE KEYBOARD WHEREIN YOUR FINAL SCORE OUT OF 120 WILL BE DISPLAYED\n\n\n\n\n\n\n\n\t\t\tALL THE BEST!!!\n\n");…

    • 1021 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    Dfd Files

    • 259 Words
    • 2 Pages

    We submit together with a proposal with a proposal of our system which is entitled Asian…

    • 259 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Voting System

    • 338 Words
    • 2 Pages

    Dim rowx As Integer, colx As Integer Dim rs As New ADODB.Recordset Dim con As New ADODB.Connection Public Sub connectdbase() If con.…

    • 338 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    An economy or economic system consists of the production, distribution or trade and consumption of limited goods and services by different agents in a geographical location. Economic growth is the increase in the market value of the goods and services produced by an economy overtime. It is conventionally measured as the percent rate of increase in real gross domestic product or GDP.…

    • 1090 Words
    • 4 Pages
    Good Essays

Related Topics