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
Aloaded platform of total mass 500 kg is supported by a dashpot and by a set of springs of effective stiffness 72 kn/m. it is observed that when the platform is depressed through a distance x = 12.5 cm below its equilibrium position and then released without any initial velocity; it reaches its equilibrium position in the shortest possible time without overshoot. find the position and velocity of the loaded platform 0.10 sec. after its release. if a further load of 400 kg is added to the platform, find, i) the frequency of damped vibrations, and i) the amplitude of vibration after 2 complete oscillations, given that the initial amplitude is 15 cm.
Answers: 1
question
Engineering, 04.07.2019 18:20
Derive the correction factor formula for conical nozzle i=-(1+ cosa) and calculate the nozzle angle correction factor for a nozzle whose divergence hal-fangle is 13 (hint: assume that all the mass flow originates at the apex of the cone.
Answers: 3
question
Engineering, 04.07.2019 19:10
Afoot bridge is made as a simple deck, 4 m long, with a cross section 2 m (wide) and 20 cm thick, and made of wood. the deck is supported at the two ends. the maximum load allowable on the bridge is 10 tons, provided it is uniformly distributed on the deck. to sense this load, a strain gauge is placed at the center of the bridge and its resistance is monitored. if the sensor has a nominal resistance of 350 s2 and a gauge factor of 3.6, what is the reading of the strain gauge at maximum load? the modulus of elasticity for the wood used in the construction is 10 gpa.
Answers: 2
question
Engineering, 04.07.2019 19:10
For a process taking place in a closed system containing gas, the volume and pressure relationship is pvi-constant. -1.5 bar, the process starts with initial conditions, pi = =0.03 m3 and ends with final volume, v2-0.05 m3 determine the work done by the gas.
Answers: 2
You know the right answer?
Program 3: President records Input file presidents. txt contains records in the form of text lines,...
Questions
Questions on the website: 13722365