// Code derived from Stroustrup's PPP2 book// § 11.2.2 Integer input// -and beginning on p 383#include<iostream>usingnamespacestd;intmain(){// example input: 1 2 3 4 ctrl+zcout<<"demo integer inputs (input some integers):\n";inta;intb;intc;intd;cin>>a>>hex>>b>>oct>>c>>d;cout<<a<<'\t'<<b<<'\t'<<c<<'\t'<<d<<'\n';//---cout<<'\n';cin.unsetf(ios::dec);// don’t assume decimal (so that 0x can mean hex)cin.unsetf(ios::oct);// don’t assume octal (so that 12 can mean twelve)cin.unsetf(ios::hex);// don’t assume hexadecimal (so 12 can mean twelve)cin>>a>>b>>c>>d;cout<<a<<'\t'<<b<<'\t'<<c<<'\t'<<d<<'\n';}