// Code derived from Stroustrup's PPP2 book// § 3.9.2 Unsafe conversions// -beginning on p 81#include<iostream>usingstd::cin;usingstd::cout;intmain(){cout<<"Please enter numbers\n";doubled=0;while(cin>>d){// repeat the statements below// as long as we type in numbersinti=d;// try to squeeze a double into an intcharc=i;// try to squeeze an int into a charinti2=c;// get the integer value of the charactercout<<"d== "<<d// the original double<<" i== "<<i// converted to int<<" i2== "<<i2// int value of char<<" char("<<c<<")\n";// the char}}