摘要:
正确输出了按分数由高→低排序的信息,生成了文本文件file3.dat 数据信息是正确的,并且是直观可读 1.屏幕上正确输出了按分数高到低排序的学生信息。 2.生成了二进制文件file4.dat,但结果不是直观可读。 #include<stdio.h> #include<stdlib.h> #defi 阅读全文
摘要:
#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 typedef struct student { int id; /*学生学号 */ char name[20]; /*学生姓名 */ char subject[2 阅读全文
摘要:
#include <stdio.h> int main() { int a[2][3] = {1,2,3,4,5,6}; int i,j; int *p; // p是指针变量,存放int型数据的地址 int (*q)[3]; // q是指针变量,存放包含有3个元素的一维数组的地址 // 通过指针变量 阅读全文
摘要:
不能,一元二次方程的根可能有两个,而返回值只能返回一个 #include <stdio.h> long long fac(int n); // 函数声明 int main() { int i,n; printf("Enter n: "); scanf("%d", &n); for(i=1; i<=n 阅读全文
摘要:
#include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, 阅读全文
摘要:
#include<stdio.h> int main(){ int a=5, b=7, c=100, d ,e, f; d=a/c*c; e=a*c/b; f=c/b*a; printf("d=%d,e=%d,f=%d\n",d,e,f); return 0; } 5整除7等于0,0乘以100等于0 阅读全文
摘要:
/*任务一*/#include<stdio.h> int main(){ printf("my stuno is:202083450036\n"); printf("2020,i am coming\n"); return 0; } /*任务二*/#include<stdio.h> int main 阅读全文
摘要:
#include<stdio.h> int main(){ char ch; ch=get char(); put char(ch); printf("%c",ch); return ; } 阅读全文