2018年10月7日
摘要: 多出来的要求: 1.可以指定题目数量: 2.支持真分数运算 实现代码: #include<stdio.h> #include<Windows.h> #include<time.h> void main() { int a, b, c, d,i,m,n; float p, q; srand(unsig 阅读全文
posted @ 2018-10-07 22:07 飞扬的狗 阅读(177) 评论(0) 推荐(0)
摘要: 实现代码: #include <stdio.h>#include <string.h>#include <stdlib.h>#include <time.h>int main(int argc, char **argv){ int a[30],b[30]; int i,c,d; srand((uns 阅读全文
posted @ 2018-10-07 21:39 飞扬的狗 阅读(409) 评论(0) 推荐(0)
摘要: 求所有子数组的和的最大值 实验思路: 从第一个元素开始循环,在嵌套另一个循环,从每个元素开始,依次加上后边的元素。 当和大于最大值时,把和赋值给最大值,并记录此时首元素的下标和尾元素的下标。 #include <stdio.h> int main(){ int a[10]; int b[5]; in 阅读全文
posted @ 2018-10-07 21:34 飞扬的狗 阅读(188) 评论(0) 推荐(0)