...随机产生1-10之间的随机正整数,进行四则运算,共十道题,答:include "stdio.h"include "stdlib.h"include "time.h"int main(){ int i,j,a,b,c,ans,ans1,score=0;float ans2;for(i=0;i<10;i++){ srand(time(0));a=rand()%9+1;b=rand()%9+1;c=rand()%3;switch(c){ case 0:ans=a+b;printf("%d+%d=?\n",a,b);scanf("%d"...
1. 已知有20个整数,如9、8、56、12、7、44、99、45、5、4、2、10、89...答:语言 : c int[] num = { 9, 8, 56, 12, 7, 44, 99, 45, 5, 4, 2, 10, 89, 63, 6, 3, 78, 24, 37, 18 };int index = 0;for (int i = 0; i < num.Length; i++){ if (num[i] == 4){ index = i + 1;break;} } //index就是要取得次序 ...