PTA3-1

Posted hjn123hjn

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PTA3-1相关的知识,希望对你有一定的参考价值。

3-1  输出倒三角图案 (10 分)

本题要求编写程序,输出指定的由“*”组成的倒三角图案。

输入格式:

本题目没有输入。

输出格式:

按照下列格式输出由“*”组成的倒三角图案。

* * * *
 * * *
  * *
   *

#include <stdio.h>
#include <stdlib.h>

int main()
{
printf("* * * * ");
printf(" * * * ");
printf(" * * ");
printf(" * ");

return 0;
}

 









以上是关于PTA3-1的主要内容,如果未能解决你的问题,请参考以下文章