- 博客(14)
- 收藏
- 关注
原创 3.1
#include <stdlib.h>#include <stdio.h>#define N 10double fun(double x[],double *av){ int i,j; double d,s;s=0;for(i=0; i<N; i++) s = s +x[i];/found/*av=s/N;d=32767;for(i=0; i<N; i++)if(x[i]<*av && *av - x
2021-07-21 21:43:22
73
原创 3
21#include<stdio.h>struct student{int num;char name[10];int cheng[3];}stu[10];main(){int i,j;for(i=0;i<10;i++){scanf("%d%s%d%d%d",&stu[i].num,stu[i].name,&stu[i].cheng[0],&stu[i].cheng[1],&stu[i].cheng[2]);}int avger
2021-07-21 21:42:24
66
原创 暑假作业2.1
#include <stdlib.h>#include <stdio.h>#define N 10double fun(double x[],double *y){ int i,j; double av;/found/av=0.0;/found/for(i=0; i<N; i++)av=av+x[i]/N;for(i=j=0; i<N; i++)/found/if(x[i]>av) y[j++]= x[i];y[j]
2021-07-14 16:28:29
96
原创 暑假作业2
11#include<stdio.h>float fish(float n){if(n==5) return (11);else return ((n+1)/n)*(fish(n+1)+1/(n+1));}main(){printf("%f",fish(1));}12#include<stdio.h>void splitfloat(float x,int *intpart,float *fracpart){*intpart=(int)x;fracpar
2021-07-14 16:25:48
67
原创 暑假作业1.2
#include <stdio.h>#define N 5typedef struct student { long sno; char name[10]; float score[3];} STU;void fun(char *filename, STU n){ FILE *fp;/**********found**********/ fp = fopen(filename, "rb+");/**********found*******
2021-07-04 11:12:51
59
原创 暑假作业1
1,#include<stdio.h>even(int n){ if(n%2) return(1); else return(0); } main() { int n,sum=0; scanf("%d",&n); while(n) { if(even(n)) sum+=n; scanf("%d",&n); } printf("%d",sum); } 2. #include<stdio.h>#in
2021-07-04 11:11:13
63
原创 c
75 #include"stdio.h"void main(){ int i,j; for(i=1;i<=5;i++) { for(j=1;j<=6-i;j++) printf(" "); for(j=1;j<=5;j++) printf("*"); printf("\n"); } }76#include"stdio.h"void main(){
2021-02-28 01:55:42
103
原创 while语句
#include<stdio.h> main() { int x=1,y=1; while(x>y) { printf("进入循环 ");//条件不成立 } }#include<stdio.h> main() { int x=2,y=1; while(x>y) { printf("进入循环 ");//进入循环未有停止点 } }#include<stdio.h>main(){ int
2021-02-07 21:52:43
136
原创 循环& * &单数&3的倍数& * &右半边三角&左半边三角&圣诞树
#include<stdio.h>main(){ int i; for(i=0;i<5;i++) printf("今天很开心:)\n"); }#include<stdio.h>main() { printf("今天很开心:)\n"); printf("今天很开心:)\n"); printf("今天很开心:)\n"); printf("今天很开心:)\n"); printf("今天很开心:)\n"); }#include
2021-02-01 09:38:46
91
原创 攻击力&攻击力防御力&剪刀&石头&布&随机出拳机器人&半自动&对战
#include<stdio.h>main(){ int attack; printf("请输入亚瑟的攻击力:\n"); scanf("%d",&attack); printf("亚瑟的攻击伤害是:%d\n",attack); } #include<stdio.h>main(){ int attack,defend; printf("请输入亚瑟的攻击力:\n"); scanf("%d",&attack); printf("请
2021-01-27 22:09:17
144
原创 helloWord--x++
#include<stdio.h>main(){ printf("hello word!"); } ```c#include<stdio.h>main(){ printf("*******************\n"); printf(" 亚瑟档案\n"); printf("*******************\n"); printf("生存能力:***\n"); printf("攻击伤害:**\n"); printf("上手难度
2021-01-23 11:08:26
125
原创 2021-1-19
#include"stdio.h"void main(){ int m,n; int sum,i,j; printf("Please enter the range [m,n]:\n"); scanf("%d%d",&m,&n); printf("\n"); printf("the Perfect number is :\n"); for(i=m;i<=n;i++) { sum=0;
2021-01-19 22:59:49
82
原创 2020-1-18
#include <stdio.h>int fun(int x){int y = 0;if (x<1)y = x;else if (x>=1 && x<10)y = 2*x-1;elsey = 3*x-11;return y;}int main(){int x, y;printf("输入baix:%d");scanf("%d", &x);y = fun(x);printf("解得y:%d\n", y);return
2021-01-18 15:05:15
92
原创 2021-1-17
#include<stdio.h>main(){printf("hello,word");```c#include<stdio.h>main(){ int f,c; scanf("%d",&f); c=(f-32)/9*5; printf("%d",c);}#include<stdio.h>main(){ int a,b,c,d,sum,Average; scanf("%d%d%d%d",&a,&b,&.
2021-01-17 19:16:36
73
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人