subject
Engineering, 08.02.2021 19:40 sadsociety41

Program 3: President records Input file presidents. txt contains records in the form of text lines, one per U. S. president. Each president record contains: The starting year of the president's term (4 digits) The ending year of the president's term (4 digits) The president's first name The president's middle initials with periods (not all presidents) The president's last name One or more blanks separate the years and the names and initials. There are no blanks inside the names. If a president has more than one initial, they are written together with periods but no blanks. You may assume that the presidents are sorted by year. But you do not know in advance how many president records there are. The last president record is followed by a dummy record that has -1 in place of the starting year. Read and store each president's years, first name, middle initials (if any), and last name in a Pascal record. Store all the records in an array of records that's large enough to hold 20 records. Following the dummy record, there is a list of search years terminated by -1. For each search year, find the president who was in office during that year (there may be more than one president) Input file presidents. txt 1961 1963 John Kennedy 1963 1969 Lyndon Johnson 1969 1974 Richard Nixon 1974 1977 Gerald Ford 1977 1981 Jimmy Carter 1981 1989 Ronald Reagan 1989 1993 George H. W. Bush 1993 2001 Bill Clinton 2001 2009 George W. Bush 2009 2017 Barack Obama -1 1975 1963 1989 2019 2001 2016 -1 Output After reading in the presidents and storing them in an array of records, print the array. Then for each search year, search the array for the matching presidents and print the search year and the presidents' names. If there is no match, print "no match".

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Steel is coated with a thin layer of ceramic to protect against corrosion. what do you expect to happen to the coating when the temperature of the steel is increased significantly? explain.
Answers: 1
question
Engineering, 04.07.2019 18:10
Air is to be cooled in the evaporator section of a refrigerator by passing it over a bank of 0.8-cm-outer-diameter and 0.4-m-long tubes inside which the refrigerant is evaporating at -20°c. air approaches the tube bank in the normal direction at 0°c and 1 atm with a mean velocity of 4 m/s. the tubes are arranged in-line with longitudinal and transverse pitches of sl- st 1.5 cm. there are 30 rows in the flow direction with 15 tubes in each row. determine (a) the refrigeration capacity of this system and (b) pressure drop across the tube bank. evaluate the air properties at an assumed mean temperature of -5°c and 1 atm. is this a good assumption?
Answers: 1
question
Engineering, 04.07.2019 18:10
Afull journal bearing has a journal diameter of 27 mm, with a unilateral tolerance of -0.028 mm. the bushing bore has a diameter of 27.028 mm and a unilateral tolerance of 0.04 mm. the l/d ratio is 0.5. the load is 1.3 kn and the journal runs at 1200 rev/min. if the average viscosity is 50 mpa-s, find the minimum film thickness, the power loss, and the side flow for the minimum clearance assembly.
Answers: 1
question
Engineering, 04.07.2019 18:10
Items are similar to the free issue items, but their access is limited. (clo5) a)-bin stock items free issue b)-bin stock controlled issue c)-critical or insurance spares d)-rebuildable spares e)-consumables
Answers: 1
You know the right answer?
Program 3: President records Input file presidents. txt contains records in the form of text lines,...
Questions
question
Mathematics, 04.03.2021 20:40
question
English, 04.03.2021 20:40
question
Mathematics, 04.03.2021 20:40
question
Mathematics, 04.03.2021 20:40
question
Arts, 04.03.2021 20:40
Questions on the website: 13722360