摘要: 1 #ifndef __HEAD_H__ 2 #define __HEAD_H__ 3 #include <stdlib.h> 4 #include <string.h> 5 #include <stdio.h> 6 //声明学生数据类型 7 struct Student{ 8 char name[ 阅读全文
posted @ 2023-02-26 17:17 不思故乡 阅读(168) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 int main(int argc,const char *argv[]) 3 { 4 int a[6]={0}; 5 int i,temp; 6 for(i=0;i<6;i++) 7 { 8 scanf("%d",&a[i]); 9 } 10 for( 阅读全文
posted @ 2023-02-22 21:21 不思故乡 阅读(35) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 int main(int argc, const char *argv[]) 3 { 4 char s[64]={0}; 5 gets(s); 6 char *p=s; 7 while(*p) 8 { 9 if(*p<='z' && *p>='a'){ 阅读全文
posted @ 2023-02-18 17:27 不思故乡 阅读(139) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 int main(int argc, const char *argv[]) 3 { 4 char a[45]="hello word"; 5 char b[45]="xjwkkk"; 6 char *p1=a; 7 char *p2=b; 8 whil 阅读全文
posted @ 2023-02-18 16:34 不思故乡 阅读(36) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 int main(int argc, const char *argv[]) 3 { 4 char a[45]="hello word"; 5 char b[45]="xjwkkk"; 6 char *p1=a; 7 char *p2=b; 8 whil 阅读全文
posted @ 2023-02-18 16:21 不思故乡 阅读(35) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 int main(int argc, const char *argv[]) 3 { 4 int g,s,b; 5 int count=0;//计数器 6 for(g=1;g<5;g++) 7 { 8 for(s=1;s<5;s++) 9 { 10 fo 阅读全文
posted @ 2023-02-16 21:40 不思故乡 阅读(110) 评论(0) 推荐(0)
摘要: 1 long fact(int n) 2 { 3 if(n==0) 4 return 1; 5 else 6 return n*fact(n-1); 7 } 8 #include <stdio.h> 9 int main(int argc, const char *argv[]) 10 { 11 l 阅读全文
posted @ 2023-02-16 17:14 不思故乡 阅读(31) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 void add(int num1,int num2) 3 { 4 printf("%d+%d=%d",num1,num2,num1+num2); 5 } 6 void sub(int num1,int num2) 7 { 8 printf("%d-%d 阅读全文
posted @ 2023-02-16 11:48 不思故乡 阅读(18) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #define N 6//宏 3 int main(int argc, const char *argv[]) 4 { 5 int a[N][N]; 6 int i,j; 7 for(i=0;i<N;i++)//外循环,第一列和最后一列都是1 8 { 9 阅读全文
posted @ 2023-02-15 13:47 不思故乡 阅读(23) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 int main(int argc, const char *argv[]) 3 { 4 int i,j,t,count; 5 int a[]={1,85,45,12,14,12,14,78,45,69}; 6 int n = sizeof(a)/siz 阅读全文
posted @ 2023-02-15 10:29 不思故乡 阅读(57) 评论(0) 推荐(0)