显示素数 [英] Display prime numbers

查看:89
本文介绍了显示素数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写程序以从用户加载两个整数。显示两个整数之间的所有素数。


我是初学者。我这样做有问题。任何人都可以教我吗?


非常感谢。

Write a program to load in two integers from the user. Display all the prime numbers between the two integers.

i''m a beginner. i''m problem doing this. can anyone teach me ?

thanks a lot.

推荐答案

当然。教学中的首要任务之一是评估学生(那是你)对问题的了解。那么,你对素数有什么了解?您考虑采取哪些方法来解决此问题?你有什么想法?
Sure. One of the first tasks in teaching is assessing what the student (that''s you) knows, regarding the problem. So, what do you know about prime numbers? What approaches have you considered taking to solve this problem? What ideas do you have?



当然。教学中的首要任务之一是评估学生(那是你)对问题的了解。那么,你对素数有什么了解?您考虑采取哪些方法来解决此问题?你有什么想法?
Sure. One of the first tasks in teaching is assessing what the student (that''s you) knows, regarding the problem. So, what do you know about prime numbers? What approaches have you considered taking to solve this problem? What ideas do you have?



数学家:3是素数,5是素数,7是素数所以完全归纳所有

奇数是素数;


物理学家:3是素数,5是素数,7是素数,9,呃,样本数据错误,11是

素数,13是素数;是的,数学还可以;


工程师:2是素数,4是素数,6是素数,8是素数,是的,所有奇数

是总理好吧。


政治家:奇怪的是什么?


哲学家:什么是素数?
< br $>
亲切的问候,


Jos; - )

mathematician: 3 is prime, 5 is prime, 7 is prime so by complete induction all
odd numbers are prime;

physicist: 3 is prime, 5 is prime, 7 is prime, 9, erm, sample data error, 11 is
prime, 13 is prime; yeah the math is ok;

engineer: 2 is prime, 4 is prime, 6 is prime, 8 is prime, yep, all odd numbers
are prime alright.

politician: what''s an odd number?

philosopher: what''s prime?

kind regards,

Jos ;-)



mathematician :3是素数,5是素数,7是素数所以完全归纳所有

奇数是素数;


物理学家:3是素数,5是素数素数,7是素数,9,呃,样本数据错误,11是

素数,13是素数;是的,数学还可以;


工程师:2是素数,4是素数,6是素数,8是素数,是的,所有奇数

是总理好吧。


政治家:奇怪的是什么?


哲学家:什么是素数?
< br $>
亲切的问候,


Jos ;-)
mathematician: 3 is prime, 5 is prime, 7 is prime so by complete induction all
odd numbers are prime;

physicist: 3 is prime, 5 is prime, 7 is prime, 9, erm, sample data error, 11 is
prime, 13 is prime; yeah the math is ok;

engineer: 2 is prime, 4 is prime, 6 is prime, 8 is prime, yep, all odd numbers
are prime alright.

politician: what''s an odd number?

philosopher: what''s prime?

kind regards,

Jos ;-)



计算机科学家:0是素数,1是主要的,内存堆栈错误。


激励:如果想要的话,每个数字都可以是素数!


牧师:我相信,所有数字都是平等的!

(哦对不起,不允许宗教内容...... ^^)


问候,

Nepomuk

Computer Scientist: 0 is prime, 1 is prime, memory out of stack error.

Motivator: Every number can be prime, if it wants to!

Priest: I believe, that all numbers were created equally!
(Oh sorry, no religious content allowed... ^^)

Greetings,
Nepomuk


这篇关于显示素数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆