c how to program 习题3.39

c how to program 习题3.39

运行结果: C语言代码: /* c how to program 习题3.39 */ #include <stdio.h> // function main begins program execution int main( void ) { //定义变量x为控制一行*的数量,y为控制*的行数 int x , y = 0; //当行数 ...

c how to program 习题3.38

c how to program 习题3.38

运行结果: C语言代码: /* c how to program 习题3.38 */ #include <stdio.h> // function main begins program execution int main( void ) { //定义变量 用户输入的数值number 临时数值temp 累加count long int number, ...

c how to program 习题3.37

c how to program 习题3.37

运行结果: C语言代码: /* c how to program 习题3.37 */ #include <stdio.h> // function main begins program execution int main( void ) { //定义变量 number int number = 0; //当number为1-100时执行循环 ...

c how to program 习题3.36

c how to program 习题3.36

运行结果: C语言代码: /* c how to program 习题3.36 */ #include <stdio.h> // function main begins program execution int main( void ) { //定义变量 number long int number = 0; //当number为1-1000000000时执 ...

c how to program 习题3.35

c how to program 习题3.35

运行结果: C语言代码: /* c how to program 习题3.35 */ #include <stdio.h> // function main begins program execution int main( void ) { //定义变量 二进制数值binary 临时数值temp 每位的数值bit 基数factor 十进制数值 ...

c how to program 习题3.34

c how to program 习题3.34

运行结果: C语言代码: /* c how to program 习题3.34 */ #include <stdio.h> // function main begins program execution int main( void ) { //定义变量 int number; printf("请输入一个5位的整数:"); ...

c how to program 习题3.33

c how to program 习题3.33

运行结果: C语言代码: /* c how to program 习题3.33 */ #include <stdio.h> // function main begins program execution int main( void ) { //定义变量 int side, x, y; //获取边长 printf("请输入正方形的边长1-20 ...

c how to program 习题3.32

c how to program 习题3.32

运行结果: C语言代码: /* c how to program 习题3.32 */ #include <stdio.h> // function main begins program execution int main( void ) { //定义变量 int side, x, y; //获取边长 printf("请输入正方形的边长 ...

c how to program 习题3.31

c how to program 习题3.31

运行结果: C语言代码: /* c how to program 习题3.30 */ #include <stdio.h> // function main begins program execution int main( void ) { int x, y; printf("请输入x的值:"); scanf("%d", &x); printf(" ...

c how to program 习题3.30

c how to program 习题3.30

(a)运行结果: (a) C语言代码: /* c how to program 习题3.30 */ #include <stdio.h> // function main begins program execution int main( void ) { int x, y; int z = 1; while( z ){ printf("请输入x的值 ...