Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Fortran language, find the product of all factors of a positive integer and output the product of all factors and factors.
Fortran language, find the product of all factors of a positive integer and output the product of all factors and factors.
Reference code

? Program? test

Implicit? nobody

Integer (8)? ::? Quantity, me, all products

Print *,? ? Input? Answer? Positive? Integer:? '

Read (*, *)? figure

All products? =? 1?

Do what? Me? =? 1, number /2

if(mod(num,I)? . eq? 0)? then

Print *,? I

All products? =? All products? *? I

End? if

End? do

Print *,? figure

Print *,? The product of all factors is:? ' ,? All products * quantity

stop

End? Program result

Screen input

? Input? Answer? Positive? Integer:?

48 screen output

? 1

2

three

four

six

eight

12

16

24

48

The product of all factors is:? 254803968