** 代码如下 ** ```js #include #include #include void main() { int x, y; int k = 0; int i; srand( (unsigned) time( 0 ) ); x = rand() % 100 + 1; for ( i = 1; i y ) printf( "您已猜了%d次,您输入的数据小了\n", k ); else printf( "您已猜了%d次,您输入...
** 代码如下 ** ```C #include void main() { float sum, t; float p, q, f; int i = 1; sum = 0; p = 1; q = 2; t = p / q; while ( i
```C #include void main() { float height; /* 女子身高 */ float faheight; /* 父亲身高 */ float maheight; /* 母亲身高 */ char sex; /* 女子性别 */ char sports; /* 子女是否喜爱体育锻炼 */ char diet; /* 子女是否有良好的饮食习惯...
** 代码如下 ** ```C #include void main() { int sum1, sum2; float sum3, sum; sum1 = 0; sum2 = 0; sum3 = 0; int i; for ( i = 1; i
** 上代码 ** ```C #include void main() { int a[10]; int i; int max, min; printf( "请输入10个整数:" ); for ( i = 0; i < 10; i++ ) scanf( "%d", &a[i] ); for ( i = 0; i < 10; i++ ) max = min = a[0]; for ( i = 0; i < 10; i++ ) { if ( a[i...
** 代码如下 ** ```C #include void main() { float sum; int i = 1; sum = 0; while ( i
** 代码如下 ** ```C #include void main() { float data1, data2, resault; /* 两个运算数据 */ char up; /* 运算符号 */ int k = 1; /* k=1正确的运算符号,k=0错误的运算符号 */ printf( "请输入两个运算数据:" ); scanf( "%f%f%*c", &data1, &data...
** 代码如下 ** ```C #include void main() { float sum = 0; float product = 1; int i; for ( i = 1; i