RosettaCodeData/Task/Totient-function/Sidef/totient-function-2.sidef

5 lines
127 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
for n in (1..25) {
var totient = 𝜑(n)
printf("𝜑(%2s) = %3s%s\n", n, totient, totient==(n-1) ? ' - prime' : '')
}