首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

求各位大侠帮帮忙 急

2012-10-24 
求各位大侠帮帮忙急在线等1010 9 1010 9 8 9 1010 9 8 7 8 91010 9 8 7 6 7 8 91010 9 8 7 6 5 6 7 8 9 10

求各位大侠帮帮忙 急 在线等
10
  10 9 10
  10 9 8 9 10
  10 9 8 7 8 9 10
  10 9 8 7 6 7 8 9 10
  10 9 8 7 6 5 6 7 8 9 10
  7 6 7
  6
  10
  10 9 10
  10 9 8 9 10
  10 9 8 7 8 9 10
  10 9 8 7 6 7 8 9 10
  10 9 8 7 6 5 6 7 8 9 10
这个要怎么做

[解决办法]

C/C++ code
#include <stdio.h>void print_line(int n, int m){    int i;    for(i = n; i >= m; i--)    {        printf("%d ", i);    }    for(i = m + 1; i <= n; i++)    {        printf("%d ", i);    }    printf("\n");}int main(int argc, char* argv[]){    int m;    for(m = 10; m >= 5; m--)    {        print_line(10, m);    }    return 0;} 

热点排行