自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 暑假作业二级题8

#include <stdio.h>#define N 4void fun(int (*a)[N], int *b){ int i,j; for(i=0; i<N; i++) {/**********found**********/ b[i]=a[0][i]; for(j=1; j<N; j++)/**********found**********/ if(b[i]<a[j][i]) b[i]=a[j][...

2021-08-25 10:20:51 150 1

原创 暑假作业71-80

#include<stdio.h>#include<math.h>int main(){ long int i,x,y,z; for(i=1;i<100000;i++) { x = sqrt(i+100); y = sqrt(i+268); if(x*x==i+100&&y*y==i+268) { printf("\n%ld\n",i); } }}#include"stdio.h" main(...

2021-08-25 10:18:44 131

原创 暑假作业二级题7

#include <stdlib.h>#include <stdio.h>#define N 20void fun( int *a){ int i, x, n=0; x=rand()%20;/**********found**********/ while (n<N) { for(i=0; i<n; i++ )/**********found**********/ if( x==a[i] ) ...

2021-08-18 10:12:17 122

原创 暑假作业61-70

#include <stdio.h>#include <stdlib.h>int main(){ FILE* fp; char ch,filename[10]; printf("please enter file name:"); scanf("%s",filename); if ((fp=fopen(filename,"w"))==NULL) { printf("error"); exit(0); } ch=getchar(); printf(...

2021-08-18 10:09:18 141

原创 暑假作业二级题6

#include <stdio.h>#include <string.h>#include <ctype.h>#define N 9long ctod( char *s ){ long d=0; while(*s) if(isdigit( *s)) {/**********found**********/ d=d*10+*s-'0';/**********found**********/ s++; ...

2021-08-11 10:39:04 72

原创 暑假作业C语言51-60

#include<stdio.h>#include<stdlib.h>#define LEN sizeof(struct Student)struct Student{ long num; float score; struct Student *next;};int n;struct Student *creat(void){ struct Student *head; struct Student *p1,*p2; n=0; p1=p2=(st...

2021-08-11 10:34:38 145

原创 暑假作业二级题5

#include <stdlib.h>#include <stdio.h>#define N 10double fun(double *x){ int i, j; double av, y[N]; av=0; for(i=0; i<N; i++) /**********found**********/ av+=x[i]/N; for(i=j=0; i<N; i++) if( x[i]<av ){ ...

2021-08-04 10:56:48 115

原创 暑假作业c语言41-50

#include<stdio.h>int fn(int a,int n){ int s; while(n>=0) { s=a*n+s; a=a*10; n--; } return s;}main(){ int a1,n1,i; scanf("%d%d",&a1,&n1); printf("%d",f...

2021-08-04 10:53:22 143

原创 暑假作业二级题4

#include <stdlib.h>#include <stdio.h>#define N 10double fun(double *x){ int i, j; double s, av, y[N]; s=0; for(i=0; i<N; i++) s=s+x[i];/**********found**********/ av=s/N; for(i=j=0; i<N; i++) if( x[i]>a...

2021-07-27 10:19:46 83

原创 暑假作业C语言31-40

#include<stdio.h>#include<stdlib.h>void input(int*p, int len){ int i; for (i=0;i<len;i++) { scanf("%d", &p[i]); }}void exchange(int *p, int len){ int max,min; int flag_min=0; int flag_max=0; max=p[0]; min=p[0]; int t...

2021-07-27 10:17:13 142

原创 暑假作业二级题3

#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++)...

2021-07-21 10:33:47 93

原创 暑假作业C语言21-30

#include<stdio.h>main() { int i,j,k,m=0,f=0; int sum=0,max=0,min=0; struct student { int num; char name[20]; char gender; int birthday[3]; int score[4]; int ave; }stu[4]={{10031,"wanggang",'M',{199...

2021-07-21 10:32:12 174

原创 暑假作业二级题2

#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...

2021-07-12 12:54:43 122

原创 暑假作业11-20

11.`#include <stdio.h>#define N 13struct person{int number;int nextp;}link[N+1];int main(){int i,count,h;for(i=1;i<=N;i++){if(i==N)link[i].nextp=1;elselink[i].nextp=i+1;link[i].number=i;}printf("\n");count=0;h=N;printf(“sequen

2021-07-12 12:51:18 90

原创 暑假作业二级题1

#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 12:31:54 78

原创 暑假作业c语音1-10题

暑假作业1-101.#include<stdio.h>int even(int n);int main(){ int n; int sum=0; while(1) { scanf("%d",&n); if(n<=0) break; if(even(n)==0) { sum+=n; } } printf("The sum of the odd numbers is %d\n",sum); return 0;} int e

2021-07-04 12:29:07 201

原创 寒假作业81-100题

第八十一题: 键盘输入一个大写字母,要求改用小写字母输出,用puthchar和getchar函数编程。#include<stdio.h>void main(){ char ch; ch=getchar(); if(ch<'A'||ch>'Z') { printf("输入的不是大写字母,请重新输入!\n"); } ch=ch+32; putchar(ch); putchar('\n');} ```

2021-02-25 13:42:05 458

原创 寒假作业第61-80

第六十一题:将一个正整数分解质因数。例如:输入90,打印出90=2*3*3*5。(1不是质数,所以1也不是质因数)#include<stdio.h>void main(){int n,i;printf("\nplease input a number:\n");scanf("%d",&n);printf("%d=",n);for(i=2;i<=n;i++) while(n!=i) { if(n%i==0)

2021-02-24 13:55:36 101

原创 寒假作业第41-60题

第四十一题:.定义一个含有30个整型元素的数组,按顺序赋予从2开始的偶数,然后按顺序以每5个数一组的形式求出平均值并输出。#include "stdio.h"void main() { int arr[30],sum=0; int i,j; for(i=0;i<30;i++) arr[i]=2*i+2; for(i=0;i<30;i++) { sum+=arr[i]; if((i+1)

2021-02-24 13:41:37 129

原创 寒假作业21-40题

寒假作业21-40题第二十一题:求5*5的二维数组的每行元素的平均值。#include"stdio.h"void main() { int arr[5][6]; int i,j; printf("please input the arr:\n"); for(i=0;i<5;i++) for(j=0;j<5;j++) scanf("%d",&arr[i][j]); for(i=0;i&

2021-02-23 13:18:33 232

原创 寒假作业1-20题

寒假作业第1-20题第一题:输出Hello World!#include"stdio.h"void main(){printf("Hello World! \n");}第二题:编写程序,将华氏度转换为摄氏度。转换公式为:c = 5 * (华氏度f - 32) / 9;其中,c为摄氏度,f为华氏度#include"stdio.h"void main(){ float f,c; printf("please input the Fahrenheit :\n"); s

2021-02-22 13:31:10 264

空空如也

空空如也

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

TA关注的人

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