摘要:
Part 1实验结论:A B G Part 2: 2-1-1: // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int 阅读全文
摘要:
#include<stdio.h> int main() { int n,a; float i,j,m,s; j=1,m=0,s=0; printf("Enter n and a:"); scanf("%d%d",&n,&a); for(i=1;i<=n;i++) { m=m+a*j; j=j*10 阅读全文