作者:yunjinqi 类别:
日期:2023-05-29 13:35:05 阅读:13 次 消耗积分:0 分
#include <stdio.h> int Fibon1(int n){ if (n == 1 || n == 2){ return 1; } else{ return Fibon1(n - 1) + Fibon1(n - 2); } } int main(){ i...
作者:yunjinqi 类别:
日期:2023-05-29 13:30:58 阅读:9 次 消耗积分:0 分
#include <stdio.h> int main(){ int a,b,c=1,d=1,i=1; if (scanf("%d %d",&a,&b)!=0){ while (d==1){ if ...
作者:yunjinqi 类别:
日期:2023-05-29 13:27:47 阅读:15 次 消耗积分:0 分
#include <stdio.h> int main(){ int my_sum=0; int num; while (scanf("%d",&num)!=0 && num>0){ if (num%2==1){my_sum+...
作者:yunjinqi 类别:
日期:2023-05-29 13:24:35 阅读:10 次 消耗积分:0 分
#include <stdio.h> int main(){ int target_num,total_trial,count=0; int my_guess; if (scanf("%d %d",&target_num,&total_trial)!=0){ ...
作者:yunjinqi 类别:
日期:2023-05-29 13:21:43 阅读:8 次 消耗积分:0 分
#include <stdio.h> int main(){ float amount; float result; if (scanf("%f",&amount)!=0){ if (amount>15.0){ ...
作者:yunjinqi 类别:
日期:2023-05-29 13:18:37 阅读:8 次 消耗积分:0 分
#include <stdio.h> struct ball{ char *name; int value; }; char compare_balls(struct ball b1,struct ball b2,struct ball b3){ //...
作者:yunjinqi 类别:
日期:2023-05-29 13:15:23 阅读:8 次 消耗积分:0 分
#include <stdio.h> int main(void){ int speed; if (scanf("%d",&speed)!=0){ if (speed>60){printf("Speed: %d - Speeding",spe...
作者:yunjinqi 类别:
日期:2023-05-29 10:33:10 阅读:11 次 消耗积分:0 分
模拟简单运算器的工作。假设计算器只能进行加减乘除运算,运算数和结果都是整数,四种运算符的优先级相同,按从左到右的顺序计算。输入格式:输入在一行中给出一个四则运算算...
作者:yunjinqi 类别:
日期:2023-05-29 10:30:40 阅读:11 次 消耗积分:0 分
本题要求编写程序计算某年某月某日是该年中的第几天。输入格式:输入在一行中按照格式“yyyy/mm/dd”(即“年/月/日”)给出日期。注意:闰年的判别条件是该年年份能被4整除但...
作者:yunjinqi 类别:
日期:2023-05-29 10:28:10 阅读:9 次 消耗积分:0 分
本题要求根据某城市普通出租车收费标准编写程序进行车费计算。具体标准如下:起步里程为3公里,起步费10元;超起步里程后10公里内,每公里2元;超过10公里以上的部分加收50%...