输出'*'号倒三角

如题。

  • Sample Output
*********** 
 *********  
  *******    
   *****      
    ***    
     *
#include <stdio.h>int main(int argc, char const *argv[]) {

  for (int i = 0; i < 11; i++) {
    for (int j = 0; j < i; j++) {
      printf(" ");
    }
    for (int j = 0; j < 11 - 2 * i; j++) {
      printf("*");
    }
    printf("\n");
  }
  return 0;
}

陕西科技大学 C语言程序设计课作业
循环结构程序编写-20190228 第七题

猜你喜欢

转载自blog.csdn.net/weixin_44413445/article/details/89364060