摘要:
验证性实验二任然正确 #include <stdio.h> #include <stdlib.h> #define N 10 // 定义一个结构体类型STU typedef struct student { int num; char name[20]; int score; }STU; int m 阅读全文
摘要:
// 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); // 函数声明 i 阅读全文
摘要:
//程序功能: //要求客户从键盘输入一个整数,判断其是奇是偶 #include <stdio.h> int main(){ int x; printf("输入一个整数:\n"); scanf("%d",&x); if(x%2==0) printf("是偶数"); else printf("是奇数"); return 0; } #include<stdio.h> int main () { int 阅读全文
摘要:
#include<stdio.h> int main () { int days; printf("输入一个整数:\n"); scanf("%d",&days); if(days>=1&&days<=5) printf("workdays,fighting\n"); else if(days==6| 阅读全文