wait 1 second c 2b 2b

Solutions on MaxInterview for wait 1 second c 2b 2b by the best coders in the world

showing results for - "wait 1 second c 2b 2b"
Linda
03 Jan 2019
1// this_thread::sleep_for example
2#include <iostream>       // std::cout, std::endl
3#include <thread>         // std::this_thread::sleep_for
4#include <chrono>         // std::chrono::seconds
5 
6int main() 
7{
8  std::cout << "countdown:\n";
9  for (int i=10; i>0; --i) {
10    std::cout << i << std::endl;
11    std::this_thread::sleep_for (std::chrono::seconds(1));
12  }
13  std::cout << "Lift off!\n";
14
15  return 0;
16}