摘要:
#include <stdio.h> #define N 4 int main() { int x[N] = {1, 9, 8, 4}; int i; int *p; // 方式1:通过数组名和下标遍历输出数组元素 for(i=0; i<N; ++i) printf("%d", x[i]); pri 阅读全文
摘要:
// 将图书信息写入文本文件data1.txt #include <stdio.h> #define N 5 #define M 80 typedef struct { char name[M]; // 书名 char author[M]; // 作者 }Book; int main() { Boo 阅读全文
摘要:
#include<stdio.h> #include<stdlib.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",sizeo 阅读全文
摘要:
#include<stdio.h> #include<stdlib.h> #include<time.h> #include<windows.h> #define N 80 void printText(int line,int col,char text[]); void printSpaces( 阅读全文
摘要:
task.1#include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int grade,number; int i; srand(time(0)); // 以当前系统时间作为随机种子 for( 阅读全文
摘要:
//打印一个字符小人 #include<stdio.h> int main() { printf(" o\n"); printf("<H>\n"); printf("I I\n"); printf(" o\n"); printf("<H>\n"); printf("I I\n"); return 0 阅读全文
摘要:
// 测试你是哪一类学习者 #include <stdio.h> int main() { int answer; char words[5000]; printf("网课学习让一些人欢喜一些人忧.\n"); printf("1. 作为喜欢自学且自律的人,觉得这样很好. 有网络,自主学习,很ok.\ 阅读全文
摘要:
#include <stdio.h> int main() { char ans1, ans2; printf("第3章认真学完一遍了没? (输入y或Y表示认真学完一遍了,输入n或N表示没有) :"); ans1 = getchar(); getchar(); printf("\n动手敲代码实践了没 阅读全文
摘要:
#include <stdio.h> int main() { int a1,a2; char g1,g2; scanf("%d%c%d%c",&a1,&g1,&a2,&g2); printf("age1=%d,gender1=%c\n",a1,g1); printf("age1=%d,gender 阅读全文
摘要:
#include<stdio.h> #include<math.h> int main() { double F,C; while(scanf("%If",&C)!=0); { F=(9*C/5)+32; printf("摄氏度c=%.2f时,华氏度F=%.2f\n",C,F); } return 阅读全文