文章 2023-12-27 来自:开发者社区

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);   &amp...

c语言编程练习题:7-31 掉入陷阱的数字
文章 2023-12-27 来自:开发者社区

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-30 念数字
文章 2023-12-27 来自:开发者社区

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-29 二分法求多项式单根
文章 2023-12-27 来自:开发者社区

c语言编程练习题:7-28 求整数的位数及各位数字之和

#include &lt;stdio.h&gt;#include &lt;math.h&gt;int main(){ &nbsp; &nbsp;int N,sum_value=0,num=0; &nbsp; &nbsp;if (scanf("%d",&amp;N)!=0 &amp;&amp; N&lt;=pow(10,9)){ &nbsp; &nbsp; &nbsp; &nbsp;while (....

c语言编程练习题:7-28 求整数的位数及各位数字之和
文章 2023-12-27 来自:开发者社区

c语言编程练习题:7-27 兔子繁衍问题

#include &lt;stdio.h&gt;int Fibon1(int n){ if (n == 1 || n == 2){ return 1; } else{ return Fibon1(n - 1) + Fibon1(n - 2); }}int main(){ &nbsp; &nbsp;int N,i=1; &nbsp; &nbsp;scanf("%d",&amp;N); while(....

c语言编程练习题:7-27 兔子繁衍问题
文章 2023-12-27 来自:开发者社区

c语言编程练习题:7-26 最大公约数和最小公倍数

#include &lt;stdio.h&gt;int main(){ &nbsp; &nbsp;int a,b,c=1,d=1,i=1; &nbsp; &nbsp;if (scanf("%d %d",&amp;a,&amp;b)!=0){ &nbsp; &nbsp; &nbsp; &nbsp;while (d==1){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &am...

c语言编程练习题:7-26 最大公约数和最小公倍数
文章 2023-12-27 来自:开发者社区

c语言编程练习题:7-25 求奇数和

#include &lt;stdio.h&gt;int main(){ &nbsp; &nbsp;int my_sum=0; &nbsp; &nbsp;int num; &nbsp; &nbsp;while (scanf("%d",&amp;num)!=0 &amp;&amp; num&gt;0){ &nbsp; &nbsp; &nbsp; &nbsp;if (num%2==1){my_sum+....

c语言编程练习题:7-25 求奇数和
文章 2023-12-27 来自:开发者社区

c语言编程练习题:7-24 猜数字游戏

#include &lt;stdio.h&gt;int main(){ &nbsp; &nbsp;int target_num,total_trial,count=0; &nbsp; &nbsp;int my_guess; &nbsp; &nbsp;if (scanf("%d %d",&amp;target_num,&amp;total_trial)!=0){ &nbsp; &nbsp; &amp...

c语言编程练习题:7-24 猜数字游戏
文章 2023-12-27 来自:开发者社区

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-22 用天平找小球
文章 2023-12-27 来自:开发者社区

c语言编程练习题:7-21 超速判断

#include &lt;stdio.h&gt;int main(void){ &nbsp; &nbsp;int speed; &nbsp; &nbsp;if (scanf("%d",&amp;speed)!=0){ &nbsp; &nbsp; &nbsp; &nbsp;if (speed&gt;60){printf("Speed: %d - Speeding",speed);} &nbsp; ....

c语言编程练习题:7-21 超速判断

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

开发与运维

集结各类场景实战经验,助你开发运维畅行无忧

+关注
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等