摘要: task1-1.c #include<stdio.h> #define N 4 int main() { int x[N]={1,9,8,4}; int i; int *p; for(i=0;i<N;++i) printf("%d",x[i]); printf("\n"); for(p=x;p<x+ 阅读全文
posted @ 2022-06-13 21:45 扶苏与越越 阅读(38) 评论(3) 推荐(0)
摘要: task1-1.c #include<stdio.h> #define N 5 #define M 80 typedef struct { char name[M]; char author[M]; }Book; int main() { Book x[N]= { {"一九八四","乔治·奥威尔"} 阅读全文
posted @ 2022-06-06 22:35 扶苏与越越 阅读(49) 评论(2) 推荐(0)
摘要: task1.1 #include<stdio.h> #define N 4 int main() { int a[N]={2,0,2,2}; char b[N]={'2','0','2','2'}; int i; printf("sizeof(int)=%d\n",sizeof(int)); pri 阅读全文
posted @ 2022-05-09 21:38 扶苏与越越 阅读(45) 评论(2) 推荐(0)
摘要: task一#include<stdio.h> task二#include<stdio.h> long long fac(int n); int main() { int i,n; printf("Enter n: "); scanf("%d",&n); for(i=1;i<=n;++i) print 阅读全文
posted @ 2022-04-25 16:26 扶苏与越越 阅读(41) 评论(1) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 int main() { int grade, number; int i; srand(time(0)); for (i = 0; i < N; ++i) { gra 阅读全文
posted @ 2022-04-18 16:10 扶苏与越越 阅读(43) 评论(2) 推荐(0)
摘要: #include <stdio.h> int main() { int answer; char words[5000]; printf("网课学习让一些人欢喜一些人忧.\n"); printf("1. 作为喜欢自学且自律的人,觉得这样很好. 有网络,自主学习,很ok.\n"); printf("2 阅读全文
posted @ 2022-03-29 17:38 扶苏与越越 阅读(37) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { char ans1, ans2; printf("第3章认真学完一遍了没? (输入y或Y表示认真学完一遍了,输入n或N表示没有) :"); ans1 = getchar(); getchar(); printf("\n动手敲代码实践了没 阅读全文
posted @ 2022-03-29 17:37 扶苏与越越 阅读(44) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int age1,age2; char gender1,gender2; scanf("%d%c%d%c",&age1,&gender1,&age2,&gender2); printf("age1=%d,gender1=%c\n",age 阅读全文
posted @ 2022-03-29 17:36 扶苏与越越 阅读(38) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<math.h> int main() { double f, c; while (scanf("%lf", &c) != EOF) { f=9*c/5+32; printf("摄氏度c=%.2f时,华氏度f=%.2f", c, f); print 阅读全文
posted @ 2022-03-29 17:35 扶苏与越越 阅读(35) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<math.h> int main() { double x, ans; while (scanf("%lf", &x) != EOF) { ans = pow(x, 365); printf("%.2f的365次方:%.2f\n", x, ans 阅读全文
posted @ 2022-03-29 17:30 扶苏与越越 阅读(34) 评论(0) 推荐(0)