text (“Assignment is veryeasy”). A): Print this statement till the time (seconds
ID: 3608355 • Letter: T
Question
text (“Assignment is veryeasy”).
A): Print this statement till the time (seconds)entered by user.
(Hint: This time will be real time. Abovestatement will get printed till enteredtime)
B): Along with each print statement also print the“remaining time”.
C): After printing above two (Statement and remainingtime). It should prompt for any key to be
pressed while the time behind will keptrunning.
Output:
Please enter time in second: 11 (Forexample)
Assignment is very easy the remaining time is 11Press any key
Assignment is very easy the remaining time is 7Press any key
Assignment is very easy the remaining time is 6Press any key
Assignment is very easy the remaining time is 4Press any key
Assignment is very easy the remaining time is 3Press any key
Assignment is very easy the remaining time is 0Press any key
Explanation / Answer
//Hope this will help you.. #include #include using namespace std; int main() { time_t t1,t2; int t,rt; coutt; t1=time(NULL); while(1) { t2=time(NULL); rt=-t2+t1 + t; if(rtRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.