Source File: ex19.cpp

#include <iostream>
#include <fmt/core.h>
#include <limits>

using std::cin, std::cout, std::getline, std::string;
using namespace fmt;

int main() {
  std::streamsize eatme = std::numeric_limits<std::streamsize>::max();
  string name;
  println("What's your name?");
  cin >> name;

  int age;

  println("What's your age?");
  cin >> age;

  while(!cin) {
    cin.clear();
    cin.ignore(eatme, '\n');
    println("Wrong, enter a number:");
    cin >> age;
  }

  // eat the newline
  cin.ignore(eatme, '\n');

  string quote;
  println("Tell me something about you?");
  getline(cin, quote);

  println("---\nHello {}, you are {} years old.",
      name, age);

  println("Something you about you:");
  cout << quote;
}