Advertisement
kalin729

Alarm C++

Nov 17th, 2016
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <ctime>
  3. #include <cstdlib>
  4. using namespace std;
  5.  
  6. int main() {
  7.     time_t rawtime;
  8.     int alarmtime;
  9.     rawtime = time(NULL);
  10.     cout << rawtime << endl;
  11.     cin >> alarmtime;
  12.     while(rawtime<alarmtime) {
  13.         rawtime = time(NULL);
  14.         cout << rawtime << endl;
  15.         system("CLS");
  16.     }
  17.     for(int i = 1; i <= 1000; i++) { cout << "\a \a \a" << endl; }
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement