摘要: task1 //task 4#include<stdio.h> #define _CRT_SECURE_NO_WARNINGS #include<stdlib.h> int main(){ char ch; int count=0; FILE *fp; fp=fopen("data4.txt","r 阅读全文
posted @ 2022-12-28 19:44 梁晨曦 阅读(16) 评论(0) 推荐(0) 编辑
摘要: task1. #include <stdio.h> #include<string.h> #define N 100 typedef struct { char num[10]; // 学号 int s1; // 期末成绩 int s2; // 平时成绩 double sum; // 总评 char 阅读全文
posted @ 2022-12-28 19:39 梁晨曦 阅读(11) 评论(0) 推荐(0) 编辑
摘要: task1 #include <stdio.h> #define N 4 int main() {int a[N] = {1, 9, 8, 4}; char b[N] = {'1', '9', '8', '4'}; int i; printf("sizeof(int) = %d\n", sizeof 阅读全文
posted @ 2022-11-30 00:09 梁晨曦 阅读(7) 评论(0) 推荐(0) 编辑
摘要: task1 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(int line, int col, char text[]); void 阅读全文
posted @ 2022-11-04 18:52 梁晨曦 阅读(10) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main () { int number; int i ; srand(time(0)); for(i = 0;i<N;i++) { number = r 阅读全文
posted @ 2022-10-25 23:46 梁晨曦 阅读(19) 评论(0) 推荐(0) 编辑
摘要: task1——1 #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") 阅读全文
posted @ 2022-10-18 21:34 梁晨曦 阅读(17) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main(){ int n ; printf("n="); scanf_s("%lld", &n); int sum = 0, i = 0, t = 1; while (i <= n) { sum += t; t *= 2; i++; } printf(" 阅读全文
posted @ 2022-10-15 12:07 梁晨曦 阅读(15) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<math.h> int main() {double x ,ans; while(scanf("%lf",&x)!=EOF) { ans=9.0/5.0*x+32.0; printf("摄氏度c=%.2lf;华氏度f=%.2lf\n",x,ans 阅读全文
posted @ 2022-10-12 09:38 梁晨曦 阅读(20) 评论(2) 推荐(1) 编辑
摘要: #include<stdio.h> #include<math.h> int main() {double x ,ans; while(scanf("%lf",&x)!=EOF) { ans=pow(x, 365); printf("%.2lf的365次方;%.2lf\n",x,ans); prin 阅读全文
posted @ 2022-10-12 09:20 梁晨曦 阅读(16) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main() {printf(" O O \n"); printf("<H> <H>\n"); printf("I I I I\n"); return 0; } 阅读全文
posted @ 2022-10-12 08:57 梁晨曦 阅读(13) 评论(0) 推荐(0) 编辑