Use ______ constructively as a time for tidying up.
查看答案
Recommendations for how to be safe in the sun
阅读以下说明和C程序代码,将程序补充完整。
[说明]
下面C程序代码的功能是:对于输入的一个正整数n(100≤n<1000),先判断其是否是回文数(正读反读都一样的数)。若不是,则将n与其反序数相加,再判断得到的和数是否为回文数,若还不是,再将该和数与其反序数相加并进行判断,依此类推,直到得到一个回文数为止。例如,278不是回文数,其反序数为872,相加后得到的1150还不是回文数,再将1150与其反序数511相加,得到的1661是回文数。
函数int isPalm(long m)的功能是:将正整数m的各位数字取出存入数组中,然后判断其是否为回文数。若m是回文数则返回1,否则返回0。
[C程序代码]
include<stdio.h>
include<stdlib.h>
int isPalm(long m)
{
int i=0, k=0;
char str[32];
while(m>0) {
str[k++]= _______ +'0';
m=m/10;
}
for(i=0; i<k/2; i++)
if(str[i]!=str _______ )return 0;
return 1;
}
int main()
{
long n, a, t;
printf("input a positive integer: "); scanf("%ld", &n);
if(n<100||n>=1000)return -1;
while(_______ ) {
printf("%id->", n);
for(a=0, t=n; t>0; ){
a= _______ *10+t%10; t=t/10;
n= _______ ;
printf("%id\n", n);
system("pause"); return 0;
听力原文:Woman: Good morning. Garden Hotel. May I help you?
Man: Good morning. I'd like to book a single room with shower, please.
Woman: Yes. When are you arriving?
Man: I'll arrive on the afternoon of July 16. Can you tell me what time I have to check out on July 20?
Woman: Checking out time is mid-day, sir. Do you prefer a room overlooking the street or the garden?
Man: A room overlooking the garden, please.
Woman: One moment please. Yes, we have a single room available on that date. Can I have your name, sir?
Man: You just write down my company's name, Sunshine Company. Can you tell me the price, please?
Woman: For each night that's $100, bed and breakfast. Can I have your fax number, please?
Man: My fax number is 020—5648899.
Woman: Thank you. I'll send a fax to confirm the booking. Goodbye.
Man: Goodbye.
(1)
(2)
(3)
(4)
(5)
(6)
(7)
请帮忙给出每个问题的正确答案和分析,谢谢!