问题标题:
程序改错题,//实验二(1)#include#includeintmain()/*Pre:Theusersuppliesanintegernandndecimalnumbers.Post:Thenumbersareprintedinreverseorder.Uses:TheSTLclassstackanditsmethods*/{x05intn;x05doubleitem;x05stacknu
问题描述:
程序改错题,
//实验二(1)
#include
#include
intmain()
/*Pre:Theusersuppliesanintegernandndecimalnumbers.
Post:Thenumbersareprintedinreverseorder.
Uses:TheSTLclassstackanditsmethods*/
{
x05intn;
x05doubleitem;
x05stacknumbers;//declaresandinitializesastackofnumbers
x05coutitem;
x05x05numbers.push(item);
x05}
x05cout
李之文回答:
#include
#include
usingnamespacestd;
intmain()
/*Pre:Theusersuppliesanintegernandndecimalnumbers.
Post:Thenumbersareprintedinreverseorder.
Uses:TheSTLclassstackanditsmethods*/
{
x05intn;
x05doubleitem;
x05stacknumbers;//declaresandinitializesastackofnumbers
x05coutitem;
x05x05numbers.push(item);
x05}
x05cout
查看更多