帮忙啊!算法编程!3题,英文的,明天下午就交作业了!急急急啊!

如果可以的话,把流程图截图发给我!(英文)可以发我邮箱963177431@qq.com1。Developanalgorithmthatwilltakeinalistofi... 如果可以的话,把流程图截图发给我!(英文)可以发我邮箱963177431@qq.com
1。Develop an algorithm that will take in a list of integers and find the largest odd integer
number and smallest even integer number in the list of positive integers.
For example, if you have the following list L = [1, 2, 5, 10, 8, 15] and run your
algorithm using the list then your algorithm should print:
The largest odd number in the list is 15.
The smallest even number in the list is 2.
2Given two lists, develop an algorithm that checks if the numbers of one list are also
contained in another, second list. If a number in one list is also contained in the second
list, your algorithm should print a message similar to the following: “this number is also
in the second list”.
For example, if you have the following two lists L1 = [0, 2, 4, 7] and L2 = [2, 3, 5, 7]
and if you run the two lists through your algorithm, it should print:
The number 2 from the first list is also in the second list.
The number 7 from the first list is also in the second list.
HINT: You need to use two loop structures to develop this algorithm.
3Write an algorithm which asks the user to enter a number and the program will print
either (a) “the number is a prime number” if the number entered is a prime number or (b)
“the number is not a prime number” if the number entered is not a prime number.
A prime number (or a prime) is a natural number greater than 1 that has no positive
divisors other than 1 and itself. For example, these numbers are all prime numbers: 2, 3,
5, 7, 11, 13, 17, 19; however, these numbers are not prime numbers: 1, 4, 6, 8, 9, 10, 12,
14, 15, 16, 18.
展开
 我来答
哇噻美女
2012-11-20 · TA获得超过450个赞
知道小有建树答主
回答量:155
采纳率:0%
帮助的人:168万
展开全部
编译后的代码发给你了,这里描述下问题:
1,求最大的奇数和最小的偶数。
2,求第一个数组中的每个元素是否包含在第二个数组。
3,判断输入是否为素数。
希望帮到你,有问题交流啊
wlkus
2012-11-20 · TA获得超过313个赞
知道小有建树答主
回答量:551
采纳率:0%
帮助的人:165万
展开全部
哪本书上的?算法导论?你们的教材有哪些?
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式