#include<stdio.h>
int main()
{
int t,i,j,k;
scanf("%d",&t);
while(t--)
{
int amplitude;
int frequency;
scanf("%d%d",&litude,&frequency);
for(i=0; i<frequency; i++)
{
for(j=1; j<=amplitude; j++)
{
for(k=1; k<=j; k++)
printf("%d",j);
printf("\n");
}
for(j=amplitude-1; j>=1; j--)
{
for(k=1; k<=j; k++)
printf("%d",j);
printf("\n");
}
if(i!=frequency-1)
printf("\n");
}
if(t!=0)
printf("\n");
}
return 0;
}
分享到:
相关推荐
% 用户可以通过确定其周期来设计各种锯齿波, % time shift, dc value, etc. 然后程序可以自动计算它的%傅里叶级数表示,并绘制其幅度谱和相位% 光谱。
此函数产生三角波,常用于电源电子设备作为 PWM 单元的载波信号
AD模块PCF8591 DA输出三角波(单片机的编程)
a code for triangle wave with microprocessor
(三角形类)设计一个扩展自抽象类GeometricObject 的新的Triangle 类。绘制Triangle 类和GeometricObject 类的UML图并实现Triangle 类。 编写一个测试程序,提示用户输入三角形的三条边、一种颜色以及一个表明该...
Triangle extends GeometricObject 设计一个名为Triangle的类来继承GeometricObject类。该类包括: 三个名为side1,side2,side3的double类型数据域来表示这个三角形的三条边,它们的默认值是1.0。 一个无参构造...
The Triangle Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 26414 Accepted: 15435 Description 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1) Figure 1 shows a number triangle. Write a program...
DAC_TwoChannels_TriangleWave DAC two channels triangle wave example
编写一个重载函数,可变输入,可变输出。计算边长分别为a、b和c的一个三角形的周长及面积。公式是p=a+b+c,s=p/2,A=sqrt(s*(s-a)*(s-b)*(s-c))
The number of rows in the triangle is > 1 but <= 100. The numbers in the triangle, all integers, are between 0 and 99. 输出 Your program is to write to standard output. The highest sum is written as ...
设计一个Triangle类,通过运算符重载来实现两个三角形的面积相加。 operator + (const Triangle& t1,const Triangle& t2); 如对你有用的话,希望你来下载啊。
STM32MP157驱动程序,STM32CubeIDE开发环境。 项目支持STM32MP1系列单片机调测和移植。 项目可直接编译、运行。
triangle-响应式bootstrap模板 适配 pc mobile
drawing of triangular wave using Fourier series concept.
sierpinski triangle MATLAB Code
triangle.html
opengl triangle loader
intput a b c three sides,so that work out them could be make a triangle or not,if could be a triangle,the little could get the basic informations about the triangle.The little process is based on MFC.
用于求三角形的面积和周长包括point点类和triangle类 判断是否是三点一线
Papanicolopulos Analytical computation of moderate-degree fully-symmetric cubature rules on the triangle