自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 收藏
  • 关注

原创 “21天好习惯”第一期-21

今天学习了如何破解环形加密int main(){ char a; int b,c; scanf("%c %d",&a,&b); c=a+b%26; int d=b%26; if (b>=0&&c<=122) { printf("%c",a+d); } if (b>=0&&c>122) { printf("%c",a+d-26); ...

2021-11-13 10:04:59 701 1

原创 “21天好习惯”第一期-20

今天学习了如何进行程序修改2#include <stdio.h>int main(){ int sum = 0, m; printf("Input m:\n"); scanf("%d", &m); while (m!=0) { sum = sum + m; printf("sum = %d\n", sum); printf("Input m:\n"); scanf("%d",...

2021-11-13 09:52:56 523

原创 ”21天养成好习惯“第一期-19

”21天养成好习惯“第一期-20今天学习了如何进行程序修改1#include <stdio.h> int main() { int j,i,sum=0; scanf("%d",&j); for(i=1;i<=j;i++) { sum=sum+i; } printf("sum = %d",sum); return 0; }运行结果如下:5sum = 15-----------...

2021-11-12 22:11:38 213

原创 ”21天养成好习惯“第一期-18

”21天养成好习惯“第一期-19今天学习了如何计算天数#include <stdio.h>int main(){ int y,m,d,x; scanf("%d/%d/%d",&y,&m,&d); if(y%4==0&&y%100!=0||y%400==0) { switch(m) { case 1:x=d; break...

2021-11-12 22:09:38 77

原创 ”21天养成好习惯“第一期-17

”21天养成好习惯“第一期-18今天学习了博弈论#include <stdio.h>int main(){ float A,B,s,c; printf("Input percent of A and B:"); scanf("%f %f",&A,&B); c=10*A+6*B; s=10*B+8*A; printf("compete = %.4f\nstandard = %.4f\n",c,s); if(c&gt...

2021-11-12 22:08:04 412

原创 ”21天养成好习惯“第一期-16

”21天养成好习惯“第一期-17今天学习了如何计算快递费用#include <stdio.h>#include <math.h>int main(){ float x,y; int a; scanf("%d,%f",&a,&x); if(a<0||a>4) { printf("Error in Area\n"); } else if(a==0) { ...

2021-11-12 22:06:27 73

原创 ”21天养成好习惯“第一期-15

”21天养成好习惯“第一期-16今天学习了如何找出三位水仙花数#include <stdio.h>#include <math.h>int main(){ int m,n,i,a,b,c; scanf("%d %d",&m,&n); if(n>=m&&m>=100&&n<=999) { for(i=m;i<=n;i++) { ...

2021-11-12 22:03:43 72

原创 “21天养成好习惯”第一期-14

“21天养成好习惯”第一期-15今天学习了如何计算交错序列前n项和#include <stdio.h>int main(){ int n,i; int x=1; float sum=0; scanf("%d",&n); for(i=1;i<=n;i++) { sum=sum+(float)i/(2*i-1)*x; x=-x; } printf("%.3f",sum);}...

2021-11-12 22:02:07 173

原创 “21天养成好习惯”第一期-13

“21天养成好习惯”-14今天学习了如何进行奖金计算#include <stdio.h>int main(){ long int a,b,x,w; scanf("%ld",&x); if(x<=100000) { w=0.1*x; } else if(x>100000&&x<=200000) { w=10000+0.075*(x-100000); ...

2021-11-12 22:00:20 194

原创 “21天养成好习惯”第一期-12

“21天养成好习惯”第一期-13今天学习了如何计算整数段和#include<stdio.h>int main(){ int A,B,Sum=0; int num=0; scanf("%d %d",&A,&B); for(int i=A;i<=B;i++) { Sum=Sum+i; num++; printf("%5d",i); if(num%5==0&&...

2021-11-12 21:57:50 376

原创 “21天养成好习惯”第一期-11

“21天养成好习惯”第一期-12今天学习了如何计算阶乘序列前n项和#include <stdio.h>int main(){ int x=1,n,sum=0; scanf("%d",&n); for(int i=1;i<=n;i++) { x=x*i; sum=sum+x; } printf("%d",sum); return 0;}运行结果如下:5153-------...

2021-11-12 21:56:16 262

原创 “21天养成好习惯”第一期-10

“21天养成好习惯”第一期-11今天学习了如何运用逆推法#include <stdio.h>int main() { int n; scanf("%d", &n); int x = 1; for (int i = 1; i < n; i++) { x = (1 + x) * 2; } printf("%d", x); return 0;}运行结果如下:101534------------...

2021-11-12 21:52:43 217

原创 “21天养成好习惯”第一期-9

“21天养成好习惯”第一期-10今天学习了如何对闰年判断#include <stdio.h>int main(){ int a; scanf("%d",&a); if(a>=1) { if(a%4==0&&a%100!=0||a%400==0) printf("Yes"); else printf("No"); } else printf("I...

2021-11-01 17:55:17 43

原创 “21天养成好习惯“第一期-8

"21天养成好习惯“第一期-9今天学习了如何根据某城市普通出租车收费标准编写程序进行车费计算例如起步里程为3公里,起步费10元; 超起步里程后10公里内,每公里2元; 超过10公里以上的部分加收50%的回空补贴费,即每公里3元; 营运过程中,因路阻及乘客要求临时停车的,按每5分钟2元计收(不足5分钟则不收费)。 编码如下 #include <stdio.h> int main() { float x; int y; float v; ...

2021-11-01 17:50:22 85

原创 “21养成好习惯”第一期-7

“21养成好习惯”第一期-8今天学习了如何计算时间差#include <stdio.h>#include <math.h>int main(){ int a,b,c,d; printf("Input time one(hour, minute):"); scanf("%d,%d",&a,&b); printf("Input time two(hour, minute):"); scanf("%d,%d",&...

2021-10-30 23:54:59 47

原创 “21天养成好习惯”第一期-6

“21天养成好习惯”第一期-7今天学习了如何计算每天取其一半绳子的第n天长度#include <stdio.h>#include <math.h>int main(){ int b; float a; printf("Input length and days:"); scanf("%f,%d",&a,&b); float c=a/(pow(2,b)); printf("length=%.5f\n",c);...

2021-10-29 22:26:34 99

原创 “21天养成好习惯”第一期-5

“21天养成好习惯”第一期-6今天学习了如何分两种情况输出星期#include <stdio.h>int main(){ int a,b,c; scanf("%d",&a); if(a+2>7){ b=a+2,c=b%7; printf("%d",c); } else{ c=a+2; printf("%d",c); } return 0;}运行结果如下:6...

2021-10-28 19:17:13 41

原创 “21天养成好习惯”第一期-4

“21天养成好习惯”第一期-5今天学习了如何拆分英文名#include <stdio.h>int main(){ printf("Input your English name:\n"); char a,b,c; scanf("%c%c%c",&a,&b,&c); printf("%c%c%c\n",a-32,b,c); int d,e,f; d=a-'`'; e=b-'a'+1; f=c-'a'...

2021-10-27 19:07:23 66

原创 “21天好习惯”第一期-3

“21天好习惯”第一期-4今天学习了如何计算两个平方数的和#include <stdio.h>#include <math.h>int main(){ float x,y; printf("Please input x and y:\n"); scanf("%f,%f",&x,&y); float m=pow(x,2)+pow(y,2); printf("Result=%.2f\n",m); return ...

2021-10-26 21:01:23 41

原创 “21天好习惯“第一期-3

今天学习了如何将产品信息格式化#include <stdio.h>int main(){ int a; float b; printf("Enter item number:\n"); scanf("%d",&a); printf("Enter unit price:\n"); scanf("%f",&b); int mm,dd,yy; printf("Enter purchase date (mm/dd/y...

2021-10-25 21:27:13 48

原创 “21天好习惯”第一期-2

“21天好习惯”第一期-2## 标题今天学习了如何计算体指数#include <stdio.h>int main(){ int w,m; float t; printf(“Input weight, height:\n”); scanf("%d,%d",&w,&m); w=w*2; printf(“weight=%d\n”,w); float h=m/100.0; printf(“height=%.2f\n”,h); t=w/h/h/2; printf(“t=%.2f\n”

2021-10-24 21:43:03 41

原创 “21天好习惯”第一期-1

“21天好习惯”第一期-1## 标题今天学到了如何拆分逆序数#include <stdio.h>#include <math.h>int main(){int x;x=fabs(x);printf(“Input x:\n”);scanf("%d",&x);int p=x%10;int q=(x%100)/10;int c=(x%1000)/100;int d=x/1000;int y=p1000+q100+c*10+d;int a=y/100;

2021-10-23 20:59:51 45

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除