1、

#include <stdio.h>

int main(void)
{
    int i;
    puts("please input an integer.");
    printf("i = "); scanf("%d", &i);
    
    while (i > 0)
    {
        printf("hello world!\n");
        i = i - 1;
    }
    printf("\n");
    return 0;
}

#include <stdio.h>

int main(void)
{
    int i;
    puts("please input an integer.");
    printf("i = "); scanf("%d", &i);
    
    while ( i-- > 0)
    {
        printf("hello world.\n");
    }
    return 0;
}

#include <stdio.h>

int main(void)
{
    int i;
    puts("please input an integer.");
    printf("i = "); scanf("%d", &i);
    
    while ( i-- )
    {
        putchar('k');
    }
    putchar('\n');
    return 0;
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
相关资源
相似解决方案