官术网_书友最值得收藏!

  • 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.

主站蜘蛛池模板: 原阳县| 阜康市| 林芝县| 莱阳市| 包头市| 西华县| 历史| 全南县| 屏山县| 区。| 青田县| 颍上县| 慈利县| 郁南县| 凤翔县| 吴旗县| 历史| 和平区| 淮南市| 长寿区| 芦山县| 江孜县| 蓬溪县| 景德镇市| 广德县| 浮山县| 湾仔区| 奎屯市| 林周县| 华蓥市| 德阳市| 邵武市| 英山县| 乌鲁木齐县| 城市| 平陆县| 吐鲁番市| 玛曲县| 鲁甸县| 青冈县| 武定县|