自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(10)
  • 收藏
  • 关注

转载 数据结构--结构体

#include<stdio.h>#include<string.h>struct Student{ int id; char name[200]; int age; } ; void f(struct Student *pst){ (*pst).id=003; strcpy(pst->name,"王...

2019-08-11 11:05:00 194

转载 Python程序--选择判断

score=int(input("Please input a score:"))if 100>=score>=90: print("A")elif 90>=score>=80: print("B")elif 80>=score>=70: print("C")elif 70>=score>=60...

2019-03-28 15:55:00 281

转载 C语言--密码问题

要将"china"译成密码,密码规律是:用原来的字母后面第4个字母代替原来的字母.例如,字母"a"后面的第4个字母是"e",用"e"代替"a".因此,"china",应译为"glmre".请编一道程序,用赋初值的方法使c1,c2,c3,c4,c5代替五个变量的值分别为'c','h','i','n','a',经过运算,使c1,c2,c3,c4,c5分别变成'g','l','m','r','...

2019-03-25 17:49:00 964

转载 C语言--二元一次方程求解(完)

(10)求方程式ax^2+bx+c=0的根.#include<stdio.h>#include<math.h>int main(){ int a,b,c; printf("请输入:"); scanf("%d%d%d",&a,&b,&c); double delta,x1,x2,m,n; delta=...

2019-03-25 17:36:00 13756

转载 C语言--二元一次方程求解(实)

(9)求方程式ax^2+bx+c=0的根.分别考虑:①有两个不相等的实根;②有两个相等的实根;#include<stdio.h>#include<math.h>int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); double delta,x1,x2; delt...

2019-03-25 16:02:00 4362

转载 C语言--公倍数问题

(8)求两个数m和n之间的最小公倍数.#include<stdio.h>int main(){ int m,n,i,x; scanf("%d%d",&m,&n); if(m<n){ x=m; m=n; n=x; } for(i=m;;i++){ if(i%m==0&&a...

2019-03-25 15:37:00 298

转载 C语言--公约数问题

(7)求两个数m和n的最大公约数.#include<stdio.h>int main(){ int m,n,i,x; scanf("%d%d",&m,&n); if(m<n){ x=m; m=n; n=x; } for(i=n;i>0;i--){ if(m%i==0&&a...

2019-03-25 15:32:00 209

转载 C语言--素数问题

(6)将100~200之间的素数打印出来.#include<stdio.h>int main(){ int i,j; for(i=100;i<=200;i++){ for(j=2;j<i;j++){ if(i%j==0) break; } if(i==j) printf("%d\n",i);...

2019-03-25 14:03:00 108

转载 C语言--简单练习

(1)有两个瓶子A和B,分别盛有醋和酱油,要求它们互换(即A瓶原来盛醋,现改盛酱油,B瓶则相反). ①#include<stdio.h> int main(){ int A,B,t; scanf("%d%d",&A,&B); t=A; A=B; B=t; printf("%d %d\n",A,B);...

2019-03-20 20:46:00 121

转载 Python程序--猜数游戏

import randomx=random.randint(1,100)print('-----猜数游戏-----')guess=0while guess!=x: temp=input('猜数开始,请输入:') guess=int(temp) if guess > x: print('大了') if gues...

2019-03-20 20:08:00 213

空空如也

空空如也

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

TA关注的人

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