【问题标题】:Why does the program print 1 where did it come from?为什么程序打印 1 它来自哪里?
【发布时间】:2022-06-16 14:42:11
【问题描述】:
#include <stdio.h>
#include <string.h>

int main (void)
{
    int i, j = 1;

    do {
        for(i=5; i>j; i=i-2)
            printf("%d\n", i+j);
        printf("%d\n", i);
        j = j + 3;
    } while(j<4);
    printf("%d\n", j);

    return 0;
}`

我从这个程序得到的输出是“6 4 1 4”,我对 1 的来源感到困惑。 `

【问题讨论】:

  • 代码从哪里来?你写的吗?

标签: c


猜你喜欢
  • 2011-11-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-05-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多