c语言编程练习题:7-31 掉入陷阱的数字
#include <stdio.h>int sum_number(int i){ int my_sum=0; int num=i; while (num>9){ //printf("sum_number:%d\n",num); &...

c语言编程练习题:7-30 念数字
#include <stdio.h>#include <math.h>int main(){ char my_string[][5] = {"ling","yi","er","san","si","wu","liu","qi","ba","jiu",}; // int n = pow(10,2); &...

c语言编程练习题:7-29 二分法求多项式单根
#include <stdio.h>double fv(double a3,double a2,double a1,double a0,double x){ double value = a3*x*x*x + a2*x*x + a1*x + a0; return value;}double solve_equation(double....

c语言编程练习题:7-28 求整数的位数及各位数字之和
#include <stdio.h>#include <math.h>int main(){ int N,sum_value=0,num=0; if (scanf("%d",&N)!=0 && N<=pow(10,9)){ while (....

c语言编程练习题:7-27 兔子繁衍问题
#include <stdio.h>int Fibon1(int n){ if (n == 1 || n == 2){ return 1; } else{ return Fibon1(n - 1) + Fibon1(n - 2); }}int main(){ int N,i=1; scanf("%d",&N); while(....

c语言编程练习题:7-26 最大公约数和最小公倍数
#include <stdio.h>int main(){ int a,b,c=1,d=1,i=1; if (scanf("%d %d",&a,&b)!=0){ while (d==1){ &am...

c语言编程练习题:7-25 求奇数和
#include <stdio.h>int main(){ int my_sum=0; int num; while (scanf("%d",&num)!=0 && num>0){ if (num%2==1){my_sum+....

c语言编程练习题:7-24 猜数字游戏
#include <stdio.h>int main(){ int target_num,total_trial,count=0; int my_guess; if (scanf("%d %d",&target_num,&total_trial)!=0){ &...

c语言编程练习题:7-22 用天平找小球
#include <stdio.h>struct ball{ char *name; int value;};char compare_balls(struct ball b1,struct ball b2,struct ball b3){ // 输出三个中不一样的数字 if (b....

c语言编程练习题:7-21 超速判断
#include <stdio.h>int main(void){ int speed; if (scanf("%d",&speed)!=0){ if (speed>60){printf("Speed: %d - Speeding",speed);} ....

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。
C语言更多编程相关
开发与运维
集结各类场景实战经验,助你开发运维畅行无忧
+关注