作业帮 > 综合 > 作业

程序改错题,//实验二(1)#include #includeint main( )/* Pre:The user su

来源:学生作业帮 编辑:灵鹊做题网作业帮 分类:综合作业 时间:2024/04/29 03:40:12
程序改错题,
//实验二(1)
#include
#include
int main( )
/* Pre:The user supplies an integer n and n decimal numbers.
Post:The numbers are printed in reverse order.
Uses:The STL class stack and its methods */
{
\x05int n;
\x05double item;
\x05stack numbers; // declares and initializes a stack of numbers
\x05cout item;
\x05\x05numbers.push(item);
\x05}
\x05cout
程序改错题,//实验二(1)#include #includeint main( )/* Pre:The user su
#include
#include
using namespace std;
int main( )
/* Pre:The user supplies an integer n and n decimal numbers.
Post:The numbers are printed in reverse order.
Uses:The STL class stack and its methods */
{
\x05int n;
\x05double item;
\x05stack numbers; // declares and initializes a stack of numbers
\x05cout item;
\x05\x05numbers.push(item);
\x05}
\x05cout