Digit fifth powers: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add COBOL) |
Not a robot (talk | contribs) (Add FOCAL) |
||
Line 360: | Line 360: | ||
194979 |
194979 |
||
The sum was 443839</pre> |
The sum was 443839</pre> |
||
=={{header|FOCAL}}== |
|||
<lang focal>01.10 S M=9^5*6 |
|||
01.20 S T=0 |
|||
01.30 F C=2,M;D 3 |
|||
01.40 T "TOTAL",T,! |
|||
01.50 Q |
|||
02.10 S X=C |
|||
02.20 S S=0 |
|||
02.30 S Y=FITR(X/10) |
|||
02.40 S S=S+(X-Y*10)^5 |
|||
02.50 S X=Y |
|||
02.60 I (-X)2.3 |
|||
03.10 D 2 |
|||
03.20 I (C-S)3.5,3.3,3.5 |
|||
03.30 T %6,C,! |
|||
03.40 S T=T+C |
|||
03.50 R</lang> |
|||
{{out}} |
|||
<pre>= 4150 |
|||
= 4151 |
|||
= 54748 |
|||
= 92727 |
|||
= 93084 |
|||
= 194979 |
|||
TOTAL= 443839</pre> |
|||
=={{header|Go}}== |
=={{header|Go}}== |