二、編程題(共2題,每題15分,滿分30分)
1、閱讀下列函數說明和C代碼,將應填入 處的字句寫在答題紙的對應欄內。
[函數1.1說明]
函數int factors(int n)的功能是判斷整數n(n>=2)是否為完全數。如果n是完全數,則函數返回0,否則返回-1。
所謂“完全數”是指整數n的所有因子(不包括n)之和等于n自身。例如28的因子為1、2、4、7、14,而28=1+2+4+7+14,因此28是“完全數”。
[函數1.1]
int factors(int n)
{
int i,s;
for(i=1,s=0;i<=n/2;i++)
if(n%i==0) (1) ;
if( (2) )return 0;
return -1;
}
[函數1.2說明]
函數int maxint(int a[], int k)的功能是用遞歸方法求指定數組中前k個元素的最大值,并作為函數值返回。
[函數1.2]
int maxint(int a[],int k)
{
int t;
if( (3) ) return (4) ;
t=maxint(a+1, (5) );
return (a[0]>t)?a[0]:t;
}
2、動物(Animals)中的貓(Cat)和狗(Dog)都有跑(Run)的動作。請運用多態技術展示貓跑和狗跑的動作。要求用C++代碼實現。
三、英語題(滿分10分)
1、選擇題(共5題,每題1分,滿分5分)
(1) is a device that converts images to digital format.
A. Copier B. Printer C. Scanner D. Display In Clanguage, a
(2) is a series of charactrs enclosed in double quotes.
A. matrix B. string C. program D. stream
(3) are those programs that help find the information you are trying to locate on the WWW.
A. Windows B. Search Engines C. Web Sites D. Web Pages
In C language, (4) are used to create variables and are grouped at the top of a gram block;
A. declarations B. dimensions C. comments D.descriptions
An (5) statement can perform a calculation and store the result in a variable so that it can be used later.
A. executable B.input C.output D. assignment
2、英譯漢(共1題,滿分5分)
The invention of the Web brought an extraordinary expansion of digital services to millions of amateur computer users, including color text and pages, formatted text, pictures, animations, video, and sound. In short, the Web makes nearly all the rich elements of human exPssion needed to establish a commercial marketplace available to nontechnical computer users worldwide.
四、日語附加題(滿分10分)
1、選擇題(共5題,每題1分,滿分5分)
1. Log
A.ロツダ B. ロヅツク C. ログ D. ロツク
2. Byte
……
2、日譯漢(共1題,滿分5分)
……
金山職業技術學院對比四川汽車職業技術學院哪個好 附分..
時間:2025-05-22 09:08:12成都銀杏酒店管理學院在重慶高考招生計劃人數和專業代..
時間:2025-05-22 09:05:01四川上山東理工大學多少分 分數線及排名
時間:2025-05-22 09:01:18江西高考理科533分排名多少 排名多少位次
時間:2025-05-22 08:57:21大連東軟信息學院對比甘肅民族師范學院哪個好 附分數線..
時間:2025-05-22 08:53:39廣東高考455至460分左右物理可以上什么大學
時間:2025-05-22 08:49:52