ScratchData LogoScratchData
Back to any296's profile

b077:質因數分解,找出1~N整數間的質數

ANany296•Created October 15, 2015
b077:質因數分解,找出1~N整數間的質數
2
2
366 views
View on Scratch

Instructions

如何在1~N找出所有質數? 將每個N【A】去除以除數B 如果在還沒A=B時,就可以整除,表示A是合數 如果直到A=B時,才可以整除,表示A是質數 【A則是從2.3.4...到A>N】 【B永遠是從2...到B=A】 假設N整數=12 A=2 B=2 A÷B=商...餘數 2÷2=1...0 A=B,A是質數2 【A+1】 3÷2=1...1【不算】 3÷3=1...0 A=B,A是質數3 【A+1】 4÷2=2...0 A不等於2,且,A÷B的餘數=0 A=4,A是合數,因為A有小於自己的因數 5÷2=2...1 5÷3=1...2 5÷4=1...1 5÷5=1...0 A=B,A是質數5 6÷2=3...0 A是合數 【B永遠是從2...到B=A】 7 8 9 10 11 12 1.為何要執行到A=B或A/B的餘數=0 2.為何A=B就是質數??? A>=B 質數只有1和本身的因數 A/ 2.3.4.5.6...直到B=A 如果在還沒有直到B=A時,A/B就可以整除 A就是合數【有一個大於1、小於A的因數】 若有小於B=A的整數,可以整除A 表示A有其他因數【除了1和本身】 This a very easy program to make. Just click the green and away you go. A long list of square numbers will appear. However, there are some issues with the program, when you get up to certain number you will start to get strange readings eg. infinity. This is just a problem with scratch. You may need to use turbo mode.

Description

THANKS 怎樣尋找質數? http://calculus.nctu.edu.tw/upload/calculus_web/maple/Site/carnival/number/02.htm 找出1~100的質數 https://www.junyiacademy.org/root/junyi-math/junyi-factors-multiples/v/EcH6qkqF2qw [愛數學]簡單的招數找「質數」 http://waknow.com/?p=4296

Project Details

Project ID82485232
CreatedOctober 15, 2015
Last ModifiedApril 8, 2016
SharedOctober 16, 2015
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root