帮忙啊!算法编程!3题,英文的,明天下午就交作业了!急急急啊!
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/08/31 21:37:20
帮忙啊!算法编程!3题,英文的,明天下午就交作业了!急急急啊!
如果可以的话,把流程图截图发给我!(英文)可以发我邮箱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.
如果可以的话,把流程图截图发给我!(英文)可以发我邮箱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.
编译后的代码发给你了,这里描述下问题:
1,求最大的奇数和最小的偶数。
2,求第一个数组中的每个元素是否包含在第二个数组。
3,判断输入是否为素数。
希望帮到你,有问题交流啊
1,求最大的奇数和最小的偶数。
2,求第一个数组中的每个元素是否包含在第二个数组。
3,判断输入是否为素数。
希望帮到你,有问题交流啊
这道题怎么做啊,求答案急急急急急啊明天要交作业了.
英语题,急!明天就要交作业了!帮忙!
要交作业了,求大神帮忙啊!matlab编程!
生动形象地介绍你家的房子,100字就ok,语文的,速度啊,我明天就要交作业,急急急!
剥皮香蕉阅读答案。急急急急急急啊,高手快帮忙,非常急急急急急急急,周末的作业
人教版6年纪下册英语书所有问答匹配急啊,明天就交作业了
用 就像……就像……就像……造句 明天就要交作业 急急急急急急急急急
初二的一道简单题...求解~急啊,明天就要交作业了>
写一篇作文《幸福在我身边》400-450字急急急急急急急啊!明天就要交了!
徒劳的寒鸦这个故事说明了什么?急啊、、、下午要交作业.
帮忙啊,明天交作业,快啊
写出下列词语的缩略形式(大家帮忙下,急,明天就要交作业了,