Engineering
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".

answer
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, tobyhollingsworth178
Which from the following instrument is commonly used to detect the high pitch butzing sound in bearings? [clo4] a)-digital ultrasonic meter b)-infrared camera c)-spectroscopic d)-vibrometer
Answers: 2
image
Engineering, 04.07.2019 19:20, Katmcfee7681
Acommercial grade cubical freezer, 4 m on a side, has a composite wall consisting of an exterior sheet of 5.0-mm thick plain carbon steel (kst= 60.5 w/m k), an intermediate layer of 100-mm thick polyurethane insulation (kins 0.02 w/m k), and an inner sheet of 5.0- mm thick aluminium alloy (kal polyurethane insulation and both metallic sheets are each characterized by a thermal contact resistance of r 2.5 x 104 m2 k/w. (a) what is the steady-state cooling load that must be maintained by the refrigerator under conditions for which the outer and inner surface temperatures are 25°c and -5°c, respectively? (b) for power saving purpose, which wall material should be increased/reduced in. thickness in order to reduce 50% of the cooling load found in part (a)? redesign the thickness of the proposed material. 177 w/m-k). adhesive interfaces between the q=575.93 w
Answers: 2
image
Engineering, 04.07.2019 19:20, jimena15
The quality is zero at a)-the saturated vapour state b)-the saturated liquid state c)-the saturated liquid-vapour mixture state d)-none of the states in the other answers
Answers: 3
image
Engineering, 05.07.2019 10:10, johns2380
What is the correct way to measure the overall length of a boat? measure from the tip of the bow to the highest point on the gunwale. measure from the tip of the bow in a straight line to the stern of the boat. measure from the tip of the bow in a straight line to the back seat. measure from port to starboard at the boat's widest point.
Answers: 1
Do you know the correct answer?
Program 3: President records Input file presidents. txt contains records in the form of text lines,...

Questions in other subjects:

Konu
Mathematics, 24.03.2021 01:00
Konu
Mathematics, 24.03.2021 01:00
Konu
Mathematics, 24.03.2021 01:00