问题 写作题

书面表达。

     下面四幅图画描述了Tom在某一节英语课里发生的事情,请根据图画内容,在答题卡上用英语写

一篇70个词左右的短文。开头已给出,不计入总数。

      要求:内容完整,意思连贯,符合逻辑,表达准确。

       参考词汇:

       开小差: be absent-minded      想象: imagine

       品尝: taste                            愤怒地: angrily

      掉到地上:fall onto the ground  圣诞老人: Father Christmas

      In an English lesson, Miss Wang was talking about American festivals. ________________________

_____________________________________________________________________________________

_____________________________________________________________________________________

答案

     In an English lesson, Miss Wang was talking about American festivals. Tom was listening carefully at

first. But later he was absent-minded. "Christmas is coming!" he thought. He imagined that Father Christmas

brought him a lot of candies as Christmas presents. He seemed to be tasting them. Just then he heard a loud

voice, "Tom, answer my question!" Tom opened his eyes and saw Miss Wang was looking at him angrily. He

was so frightened that his book fell onto the ground.

(答案不唯一)

选择题
问答题

已知在文件IN.DAT中存有100个产品销售记录,每个产品销售记录由产品代码dm(字符型4位)、产品名称mc (字符型10位)、单价dj(整型)、数量s1(整型)、金额je(长整型)五部分组成。其中:金额=单价*数量计算得出。函数ReadDat()是读取这100个销售记录并存入结构数组sell中。请编制函数SortDat(),其功能要求:按产品代码从大到小进行排列,若产品代码相同,则按金额从大到小进行排列,最终排列结果仍存入结构数组sell中,最后调用函数WritcDat()把结果输出到文件OUT8.DAT中。
部分源程序已给出。
请勿改动主函数main()、读数据函数ReadDat()和输出数据函数WriteDat()的内容。
#include<stdio.h>
#include<mem.h>
#include<string.h>
#include<conio.h>
$include<stdlib.h>
$define MAX 100
typedef struct
char dm[5]; /*产品代码*/
char mc[ll]; /*产品名称*/
iht dj; /*单价*/
int sl; /*数量*/
long je; /*金额*/
PRO;
PRO sell[MAX];
void ReadDat();
void WriteDat();
void SortDat ()

void main ()

memset(sell,0,sizeof(sell));
ReadDat();
SortDat();
WriteDat();

void ReadDat()

FILE *fp;
char str[80],ch[ll];
int i;
fp=fopen("IN.DAT","r");
for(i=0;i<100;i++)
fgets(str, 80,fp);
memcpy(setl[i].dm, str, 4);
memcpy(sell[i].mc, str+4,10);
memcpy(ch, str+14,4);ch[4]=0;
sell[i].dj=atoi(ch);
memcpy(ch, str+lS,5);ch[5]=0;
sell[i].sl=atoi(ch);
sell[i].je=(long)sell[i].dj*sell[i].s1;

fclose(fp);

void WriteDat(void)

FILE *fp;
int i;
fp=fopen("OUT8.DAT","w");
for(i=0;i<100;i++)
fprintf(fp,"%s%s%4d %5d %10Ld\n", sell[i].dm, sell[i].mc,sell[i].dj,
sell[i].sl,sell[i].je);

fclose(fp);