Sony C++笔试题

进修社 人气:9.98K

1.完成下列程序

Sony C++笔试题

*

*.*.

*..*..*..

*…*…*…*…

*….*….*….*….*….

*…..*…..*…..*…..*…..*…..

*……*……*……*……*……*……*……

*…….*…….*…….*…….*…….*…….*…….*…….

#include

#define N 8

int main()

{

int i;

int j;

int k;

———————————————————

||

———————————————————

return 0;

}

2.完成程序,实现对数组的`降序排序

#include

void sort( );

int main()

{

int array[]={45,56,76,234,1,34,23,2,3}; //数字任//意给出

sort( );

return 0;

}

void sort( )

{

——————————————————

||

——————————————————

}

3.费波那其数列,1,1,2,3,5……编写程序求第十项。可以用递归,也可以用其他方法,但要说明你选择的理由。

#include

int Pheponatch(int);

int main()

{

printf(“The 10th is %d”,Pheponatch(10));

return 0;

TAGS:笔试 SONY