自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 81------90

81public class test { public static void main(String[] args){ //以下是输入整个数组 int n; int array[]; System.out.println("请输入整数的个数"); Scanner keyboard=new Scanner(System.in); n=keyboard.nextInt(); array =...

2021-09-13 15:38:45 84

原创 76-----80

76.#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>/* 题目:八进制转换为十进制 八进制456 =》 十进制 302 302 = 6*pow(8,0)+5*pow(8,1)+4*pow(8,2)*/int main07(){ int n;...

2021-08-23 10:55:26 114

原创 71----75

71.#include "stdio.h"#include "math.h"int main(void){ int x = -100; double y = 0, z = 0; // y+,z+,0<(z+y)<168,0<(z-y)<168 do { y = sqrt(x + 100); z = sqrt(x + 100 + 168); if (y == (int)y &&...

2021-08-21 10:13:36 84

原创 66------70

66.#include <stdio.h>long get_file_size(char *file_name){ FILE *fp = NULL; if((fp = fopen(file_name,"r")) == NULL){ printf("获取文件失败"); return -1; } //从文件末尾偏移,偏移0位 fseek(fp,0,SEEK_END); long file_size = ftell(fp...

2021-08-18 09:15:19 97

原创 61-----65

61.#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"); ...

2021-08-17 08:40:17 64

原创 56-----60

56.不会做57.#include <stdio.h>void average(float *p,int n){int i=0;float *p_end,sum=0,ave;p_end=p+n;for (;p<p_end;p++,i++){ printf("%d=%.0f ",i,*p); sum+=(*p);}printf("\n\n");ave=sum/n;printf("总分数:%.2f\n",ave);}void ...

2021-08-08 09:41:54 48

原创 51-----55

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

2021-08-05 11:05:14 67

原创 46----50

46.#include <stdio.h>#include <math.h>#include <string.h>int main( ){ void hexadecimal_to_decimalism(char hexadecimal[]); char hexadecimal[100]; printf("请输入一个十六进制数:"); gets(hexadecimal); hexadecimal_to_decimalism(hexadec...

2021-07-27 09:32:41 48

原创 41-----45

41.#include<stdio.h>void main(){int a,n,s=0;printf(“Input a: “);scanf(”%d”,&a);printf(“Input n:”);scanf("%d",&n);while(n>=0){s=an+s;a=a10;n–;}printf(“s= %d\n”,s);}42.#include<stdio.h>int main(){ void sort(int...

2021-07-27 09:28:44 46

原创 二级题库29.

1.#include <stdio.h>#define N 100void fun( int *a , int n ){ int i, t; for( i=0; i<n; i++ )/**********found**********/ a[i]=0; i=0;/**********found**********/ t=1; while( i<n ) { a[i]= 1; t++;/***...

2021-07-21 09:00:06 37

原创 二级题库28.

1.#include <stdio.h>typedef struct list{ char data; struct list *next;} Q;void fun( Q *pa, Q *pb, Q *pc){ Q *p;/**********found**********/ pa->next=pb0; pb->next=pc; p=pa; while( p ) {/**********found**********/...

2021-07-20 08:38:52 86

原创 二级题库27.

1.#include <stdio.h>#include <stdlib.h>void fun( int *a, int n ){ int i; for(i=0; i<n; i++) {/**********found**********/ if( i%5==0 )/**********found**********/ printf("\n");/**********found**********/ ...

2021-07-20 08:25:10 127

原创 二级题库26.

#include <stdio.h>#define N 9int fun(int x[]){ int i,j,k,t,mid,b[N]; for(i=0;i<N;i++) b[i]=x[i]; for(i=0;i<=N/2;i++) { k=i; for(j=i+1;j<N;j++) if(b[k]>b[j]) k=j; if(k != i ) { /**********found**...

2021-07-19 09:12:18 135

原创 二级题库25.

1.#include <stdio.h>#define N 5typedef struct student { long sno; char name[10]; float score[3];} STU;void fun(char *filename){ FILE *fp; int i, j; STU s[N], t;/**********found**********/ fp = fopen(filename, "rb");...

2021-07-19 09:02:15 93

原创 二级题库24.

1.#include <stdio.h>double f1(double x){ return x*x; }double f2(double x, double y){ return x*y; }/**********found**********/__1__ fun(int i, double x, double y){ if (i==1)/**********found**********/ return __2__(x); else/*...

2021-07-18 08:18:47 103

原创 二级题库23.

1.#include <stdio.h>#include <string.h>#define N 5#define M 8void fun(char (*ss)[M]){ char *ps[N],*tp; int i,j,k; for(i=0; i<N; i++) ps[i]=ss[i]; for(i=0; i<N-1; i++) {/**********found**********/ k=i; f...

2021-07-18 08:17:40 190

原创 二级题库22.

1.#include <stdio.h>#include <string.h>#include <ctype.h>void fun(char *s){ int k[26]={0},n,i,max=0; char ch; while(*s) { if( isalpha(*s) ) {/**********found**********/ ch=tolower(*s); n=ch-'a';/**********fo...

2021-07-17 09:15:23 113

原创 二级题库21.

1.#include <stdio.h>#include <string.h>#include <ctype.h>int fun(char *s){ int sum=0; while(*s) {/**********found**********/ if( isdigit(*s) ) sum+= *s- 48 ;/**********found**********/ s++; }/**********found******...

2021-07-17 09:07:56 186

原创 36---40

36.#include <stdio.h>int main(){ void count(char *p); char str[100], *p=str; printf("请随便输入一个字符串:"); gets(p); printf("您输入的字符串为:\n%s\n\n", p); count(p); return 0;}void count(char *p){ int u,l,s,n,o; u=l=s=n...

2021-07-15 08:55:21 58

原创 31----35

31.#include<stdio.h>#include<stdlib.h>#pragma warning(disable:4996)int main(){ void *input(int *p,int n); int array[10]; int n = sizeof(array)/4; printf("n的值是%d\n", n); input(array,n); printf("数组从大到小排序后:\n"); for ...

2021-07-14 08:47:28 36

原创 二级题库20.

1.#include <stdio.h>int fun(char *s, char *t){ int n=0; while(*s) { if(*s < 97) {/**********found**********/ *(t+n)= *s ; n++; }/**********found**********/ s++ ; } *(t+n)=0;/**********found**********/ return n;}vo...

2021-07-13 08:59:43 121

原创 二级题库19.

1.#include <stdio.h>int fun(char *s){ int n=0, flag=0; while(*s!='\0') { if(*s!=' ' && flag==0) {/**********found**********/ n++; flag=1;}/**********found**********/ if (*s==' ') flag= 0 ;/**********found**********/ ...

2021-07-13 08:57:14 165

原创 二级题库18.

1.#include <stdio.h>#include <string.h>#include <ctype.h>int fun(char *s){ char *lp,*rp;/**********found**********/ lp=s; rp=s+strlen(s)-1; while((toupper(*lp)==toupper(*rp)) && (lp<rp) ) {/**********found***...

2021-07-12 08:56:22 23

原创 二级题库17.

1.#include <stdio.h>#include <string.h>#define N 80void fun(char *s, int n, char *t){ int len,i,j=0; len=strlen(s);/**********found**********/ if(n>=len) strcpy(t,s); else {/**********found**********/ for(i=len-n; i...

2021-07-12 08:39:38 155

原创 二级题库16.

1.#include <stdio.h>#define M 3#define N 4void fun(int (*a)[N]){ int i=0,j,find=0,rmax,c,k; while( (i<M) && (!find)) { rmax=a[i][0]; c=0; for(j=1; j<N; j++) if(rmax<a[i][j]) {/**********found********...

2021-07-10 08:38:14 47

原创 二级题库15.

1.#include <stdio.h>#define M 3#define N 5void fun(int (*a)[N],int k){ int i,j,p,temp;/**********found**********/ for(p=1; p<=k; p++) for(i=0; i<M; i++) { temp=a[i][0];/**********found**********/ for(j=0;...

2021-07-10 08:12:43 135

原创 二级题库14.

1.#include <stdio.h>#define N 3#define M 4/**********found**********/void fun(int (*a)[N], intk){ int i,temp ;/**********found**********/ for(i = 0 ; i < N ; i++) { temp=a[0][i] ;/**********found**********/ a[0][i] = a[k][...

2021-07-09 08:33:01 165

原创 二级题库13.

1.#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>char *fun(char *s){ int i, j, k, n; char *p, *t; n=strlen(s)+1; t=(char*)malloc(n*sizeof(char)); p=(char*)malloc(n*sizeof(char)); j=0...

2021-07-09 08:21:44 53

原创 二级题库12.

1.#include <stdio.h>#include <stdlib.h>#define N 6typedef struct node { int data; struct node *next;} NODE;void fun(NODE *h){ NODE *p, *q; int t;/**********found**********/ p =h->next; while (p) {/**********f...

2021-07-08 08:57:26 110

原创 二级题库11.

1.#include <stdio.h>double f1(double x){ return x*x; }double f2(double x, double y){ return x*y; }double fun(double a, double b){/**********found**********/ double(*f)(); double r1, r2;/**********found**********/ f =fl ; r...

2021-07-08 08:49:46 127

原创 26-----30

26.#include <stdio.h>#include <math.h>int prime(int n){ int i; long k; k = sqrt(n) + 1; for (i = 2; i <= k; i++) if (n%i == 0) return 0; return 1;}int main(){ int mp, n = 0, i; printf...

2021-07-07 08:30:46 52

原创 二级题库10.

1.#include <stdio.h>#define N 3int fun(int (*a)[N]){ int i,j,m1,m2,row,colum; m1=m2=0; for(i=0; i<N; i++) { j=N-i-1; m1+=a[i][i]; m2+=a[i][j]; } if(m1!=m2) return 0; for(i=0; i<N; i++) {/**********found**********/ ...

2021-07-05 08:59:45 69

原创 二级题库9.

1.#include <stdio.h>#define N 7/**********found**********/void fun(int (*a)[N] if(N%2==0) m=N/2 ; else m=N/2+1; for(i=0; i<m; i++) {/**********found**********/ for(j=i; j<N-i; j++) a[i][j]=a[N-i-1][j]=i+1; ...

2021-07-05 08:57:01 292

原创 二级题库8.

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

2021-07-05 08:48:10 60

原创 二级题库7.

1.#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-07-04 17:09:13 73

原创 二级题库6.

1.#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-07-04 16:36:55 62

原创 二级题库5.

1.#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-07-03 08:11:51 74

原创 二级题库4.

1.#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]>av...

2021-07-03 08:01:40 352

原创 二级题库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++)...

2021-07-03 07:40:00 122

原创 二级题库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;...

2021-07-03 07:32:48 155

空空如也

空空如也

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

TA关注的人

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