如何用c ++跟踪它 [英] how to trace this with c++

查看:85
本文介绍了如何用c ++跟踪它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

7。跟踪以下程序。对于此跟踪分配,将为您提供列标题。与往常一样,请遵循家庭作业分配指南文档中指定的跟踪指南。



  #include   <   iostream  >  
使用 命名空间标准

int main()
{
int x,y;
cout<< x + y<< ENDL;
for (x = 12 ,y = 1 ; x> 0; x / = 2
{
if (x 3
cout<< x + y<< ENDL;
cin>> Ÿ;
}
}



输入x输出



5

6

7

8

解决方案

这是你的功课。如果我这样做,我就会得到信用,这意味着你可以在余生中为我工作而无需花钱。所以我要留下让你去做,如果有人为你做这件事,我要报告他们。

我希望'足够清楚。

7. Trace the following program. For this tracing assignment, the column headings are provided for you. As always, follow the tracing guidelines as specified in the Homework Assignment Guidelines document.

#include <iostream>
using namespace std;
	
int main()
{
    int x, y;
    cout << x + y << endl;
    for (x=12, y=1; x>0; x/=2)
    {
        if (x   3)
            cout << x + y << endl;
        cin >> y;
    }
}


input x y output

5
6
7
8

解决方案

It''s your homework. If I do it I get the credit and that means you get to work for me for the rest of your life for no money. So I''m going to leave it for you to do and if anyone else does it for you I''m going to report them.
I hope that''s clear enough.


这篇关于如何用c ++跟踪它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆