- The Modern C# Challenge
- Rod Stephens
- 78字
- 2021-08-13 15:23:53
11. Primality testing
A prime number is an integer greater than 1 that has no factors other than 1 and itself. For example, 17 is prime because the only positive integers that you can multiply to get 17 are 1 and 17. In contrast, 21 is not prime because 3 × 7 = 21. Integers greater than 1 that are not prime are called composite numbers.
Write a program that determines whether an integer is prime or composite.
推薦閱讀
- 感官的盛宴:數(shù)學(xué)之眼看藝術(shù)(萬物皆數(shù)學(xué))
- 一定要懂博弈論
- 開悟:數(shù)學(xué)黑客的生活之旅
- 紅發(fā)克拉拉的數(shù)學(xué)奇想
- 數(shù)字、代數(shù)和圖象(全彩版)
- 10堂極簡(jiǎn)概率課
- 排序問題的數(shù)學(xué)規(guī)劃松弛方法
- 2016年管理類專業(yè)學(xué)位聯(lián)考綜合能力考試 數(shù)學(xué)考點(diǎn)歸納與真題解析
- 博弈論與信息經(jīng)濟(jì)學(xué):PBL教程
- 圖解數(shù)學(xué)思維訓(xùn)練課:建立孩子的數(shù)學(xué)模型思維(多步計(jì)算應(yīng)用訓(xùn)練課)
- 統(tǒng)計(jì)學(xué)原理(第二版)
- 現(xiàn)代啟發(fā)式優(yōu)化方法及其應(yīng)用
- ABAQUS 2018有限元分析從入門到精通
- 迷人的數(shù)學(xué)+美麗的數(shù)學(xué)(共2冊(cè))
- 數(shù)學(xué)也可以這樣學(xué):大自然中的幾何學(xué)