// Code derived from Stroustrup's PPP2 book// § 11.2.3 Floating-point output// -and beginning on p 384#include<iostream>usingnamespacestd;intmain(){cout<<1234.56789<<"\t\t(defaultfloat)\n"// \t\t to line up columns<<fixed<<1234.56789<<"\t(fixed)\n"<<scientific<<1234.56789<<"\t(scientific)\n";//---cout<<'\n';cout<<1234.56789<<'\t'<<fixed<<1234.56789<<'\t'//<<scientific<<1234.56789<<'\n';cout<<1234.56789<<'\n';// floating format “sticks”//---cout<<'\n';cout<<defaultfloat<<1234.56789<<'\t'// the default format for// floating-point output<<fixed<<1234.56789<<'\t'//<<scientific<<1234.56789<<'\n';}