Home / Expert Answers / Computer Science / in-c-plz-write-a-program-to-determine-the-time-from-a-non-working-led-alarm-clock-a-led-clock-use-pa480

(Solved): IN C++ PLZ Write a program to determine the time from a non-working LED alarm clock. A LED clock use ...



IN C++ PLZ Write a program to determine the time from a non-working LED alarm clock. A LED clock uses four 7segment displays to show the time. Each 7-segment display has seven bars on it, and displays different numbers by turning on different bars: Using a bit to represent each segment, one can describe a display with seven bits. For example, if the segments are numbered as such: Then the display: can be represented with bits: 0000111 The numbers in this problem are listed on the table to the right. If a segment on the display is "burnt out", however, it will not display even though it should. For example, if the number three were to be displayed, but the segment corresponding with bit 7 were burnt out, the display would instead be: Input will be from a data file where the first line contains a single integer n in the range [1, 7] indicates the number of data sets. For each data set there is a single line containing eight 7-bit strings representing the LED displays observed. The first four strings will represent the first time displayed and the next four strings will represent the second time displayed. All the strings will be separated by a single space and assume it is not given which segments are burnt out. For each labeled data set, output to the screen the second time observed in the LED display, in the format HH:MM. The segments that are burnt out will be consistent between the first and second time displayed. Assume there is only one possible solution for each data set, and all times (for input and output) will be represented in standard (non-military) format, with no leading zeros (nine o'clock is 9:00, not 09:00 ). Let the user input the file name from the keyboard. Finally, the program should ask if the user wants to run the program again (Check case). Refer to the sample output below. Sample File: 2 0110000 1101101 1111110 1111111 0000000 1111011 1111110 11111111 0000000 0000000 1000001 1111111 0100000 0000001 0000000 0110000 Sample Run: Enter filename: ledclock.txt Time 1: 9:08 Time 2: 12:11 Run again ( Y//N ): n



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe