更新时间:2018-11-22 15:21作者:李天扬老师
今天参加了中国人民银行的会计类考试,试题类型大致如下:
1.完成下列程序
*
*.*.
*..*..*..
*...*...*...*...
*....*....*....*....*....
*.....*.....*.....*.....*.....*.....
*......*......*......*......*......*......*......
*.......*.......*.......*.......*.......*.......*.......*.......
#include
#define N 8
int main()
{
int i;
int j;
int k;
---------------------------------------------------------
││││││
---------------------------------------------------------
return 0;
}
答:
#define N 8
int main()
{
int i;
int j;
int k;
for(i=0;i{
for(j=0;j{
printf("*");
for(k=0;kprintf(".");
}
printf("\n");
}
return 0;
}
2.完成程序,实现对数组的降序排序
#include
void sort( );
int main()
{
int array[]={45,56,76,234,1,34,23,2,3}; //数字任意给出