以下程序执行后输出的结果是【 】。
include<iostream>
using namespace std;
int fac(int a,int b){
return(b-a)*a;
}
int main(){
int x=3,y=4,z=5,result;
result=fac(fac(x,y),fac(x,z));
cout<<result<<endl;
return 0;
}
查看答案
听力原文: Sight is not something that reaches out from our eyes. Instead it is the light that travels to our eyes. You see this page, for example, because light, reflecting from the sun or an electric light, travels from the paper to your eyes. Sometimes we see light as it comes from a direct source, such as the sun, fire, lighting, or a light bulb. The rest of the time we see light as it is reflected off objects. It must have been a great leap in the intuition of scientists to realize that light actually travels. It isn’t just there! In the air light travels at a speed of 186,000 miles per second. It travels slightly faster in a vacuum and slower in other trans- parent materials such as water or diamonds. It takes light less than one minute to travel from the earth to the moon and about 15 minutes to go from the earth to the sun.
(1)
In general, the interests of the poor are destroyed ______
The elites are interesting and important ______
数组str全由大小写字母字符组成。请补充函数fun(),该函数的功能是:把str中的字母转换成紧接着的下一个字母,如果原来的字母为‘z’或‘Z’,则相应地转换成‘a’或‘A’,结果仍保存在原数组中。
例如,输入“StudentZz”,则输出“TuvefouAa”。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。
试题程序:
include<stdio.h>
define N 80
void fun(char s[])
{
int i;
for(i=0;【 】;i++)
{
if(s[i]=='z'||s[i]='Z')
s[i]-=【 】;
else
s[i]+=【 】;
}
}
main()
{
char str[N];
clrscr();
printf("\n Input a string:\n");
gets(str);
printf("\n*** original string***\n");
puts(str);
fun(str);
printf("\n*** new string***\n");
puts(str);
}