Description
在课堂上,我们画过了星号沙漏型,也画过了星号等腰梯形,今天请你编程序画出星号直角梯形。已知第一层的星号个数为a,每一层星号个数比上一层多m个,层数为h。
Input
输入只有一行,用空格隔开的三个正整数a,m,h。
Output
输出符合要求的直角梯形。
Sample Input
4 2 6
Sample Output
**** ****** ******** ********** ************ **************
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,i,j;
cin>>a>>b>>c;
for(i=a;i<=a+c*b-b;i+=b)
{
for(j=1;j<=i;++j)
cout<<"*";
cout<<"\n";
}
return 0;
}