Write a program that, after pressing the F1 key, prints the operating instructions, F2 starts the measurement and the program ends F10 or ESC. The measurement will consist in the fact that the program generates a random character (letters are enough), displays it in the middle of the window and starts the time measurement. The measurement stops when the user presses the same key. If the user presses something else, the program will ignore it. Finally, the program prints the measured time that elapses from the printout to the pressing of the same key. Example:
Press: X …. 1.25 s compressed X
Press: Z … .. 33.12 s pressed successively ABCDEF… Z
End pressed F10
Tip: Instructions and sample program for working with time and the time.h library
Tip: Instructions and sample program for working with the keyboard and the conio.h library
Tip: Instead of the conio.h library, you can use others, such as curses.h or ncurses, used in the Unix world.
write the program in c language.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here