里掖角老角梁
参考答案:
里掖角角梁两根中的下面一根,主要用于承接里角与之相交的檐椽。
促使宋朝人们日常发生许多新变化的根本原因是[ ]
A. 社会经济的发展
B. 统治者的大力提倡
C. 少数民族的影响
D. 人类物质生活的需要
字符串str由数字字符‘0’和‘1’组成(长度不超过8个字符),可看作二进制数,请补充函数fun(),该函数的功能是:把str字符串转换成十进制数,结果由函数返回。例如,输入“1001”,结果输出:9。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。 试题程序: #include<stdio.h> #include<stdlib.h> #include<string.h> int fun(char *str) int n;char *p=str; 【1】 ;p++;while (*p) n= 【2】 ; p++;return 【3】 ;main() char str[9];int i;int n;printf ("Enter a string made up of ’0’ and’1’ digital character:");gets (str);if (strlen(str)>8) printf ("Error:string too longer! please input again !\n\n"); exit(0); for(i=0;str[i];i++) if(str[i]<’0’||str[i]>’1’) printf("Error:%c not is ’0’and’1’ digital character !\n\n",str[i]);exit(0); printf("The original string:"); puts(str); n=fun(str); printf("\n%s is convered to decimal number:%d\n\n",str,n);