Can I help you, madam?


原文

A woman in jeans stood at the window of an expensive shop. Though she hesitated for a moment, she finally went in and asked to see a dress that was in the window. The assistant who served her did not like the way she was dressed. Glancing at her scornfully, he told her that the dress was sold. The woman walked out of the shop angrily and decided to punish the assistant next day. She returned to the shop the following morning dressed in fur coat, with a handbag in one hand and a long umbrella in the other. After seeking out the rude assistant, she asked for the same dress. Not realizing who she was, the assistant was eager to server her this time. With great difficulty, he climbed into the shop window to get the dress. As soon as she saw it, the woman said she did not like it. She enjoyed herself making the assistant bring almost everything in the window before finally buying the dress she had first asked for.


译文

一位穿着牛仔的女士站在一个高档商店的橱窗前。她虽然犹豫了一会,最终还是走进去想看一下在橱窗中的一件衣服。接待她的售货员不太喜欢她的穿着,很轻蔑看了她一眼告诉她说那件衣服已经卖出去了。这位女士很生气走出商店打算明天好好教训一下那位售货员。第二天早上当她再次走入这家商店穿着一件裘皮大衣,一只手提着手提包另一只手拿着一把长柄雨伞。她找到那个无礼的售货员,还是想看昨天那件衣服。那个售货员没有认出她,这次很热情接待她。他很艰难的爬入橱窗拿出那件衣服。她看了一眼,说她不喜欢这件。她开心的让售货员把橱窗中所有的衣服都拿出来,最终买下最开始想要的那件衣服。

转载于:https://my.oschina.net/robinsonlu/blog/513708

判断一个英文句子是否是回文。 回文原指一个正读和反读都完全一样的单词。例如level是一个回文。若忽略标点符号、空格及字母大小的差异,回文的概念可以扩展到一个英文句子。例如,Madam, I’m Adam就是一个回文句子。 下列程序中,函数palin的功能是判断一个英文句子是否是回文,如果是返回1,否则返回0。 【含有错误的源程序】 #include <stdio.h> #include <string.h> #include <stdlib.h> void palin(char *s) { int i, j, k, ok; char *sp, ch; k=strlen(s); sp=(char *)malloc(k+1); if(sp==NULL) { printf("error!\n"); exit(0); } k=0; while(*s) { ch=*s; if(!('A'<=ch && ch<='Z')) sp[k++]=ch-'A'+'a'; else if('a'<=ch && ch<='z') sp[k++]=ch; s++; } sp[k]= '\0'; ok=1; for(i=0, j=k-1;i>j; i++,j--) if(sp[i]!=sp[j]) { ok=0; break;} free(sp); return ok; } void main() { char s[80]={ "Madam, I'm Adam. ","Not a palindrome. "}; int i,ok; for(i=0; i<2; i++) { ok=palin(s[i]); printf(ok?"%s: Yes.\n":"%s: No.\n",s[i]); } } 【测试数据与运行结果】 测试数据:“Madam, I'm Adam.”,“Not a palindrome.” 运行结果: Madam, I’m Adam.:Yes. Not a palindrome.:No. 【要求】 1. 将上述程序录入到文件myf153.c中,然后根据题目的要求以及程序中语句之间的逻辑关系对程序中的错误进行修改。 2. 改错时,可以修改语句中的一部分内容,调整语句次序,增加少量的变量说明或编译预处理命令,但不能增加其它语句,也不能删去整条语句。
06-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值