Question: output of zahlentheorie(1000000) 1. function zahlentheorie (araragisan : integer) : integer; var arararagisan : kamimashita, chigau, kamimamita : integer; 3. array [1..1000000] of integer =

1. function zahlentheorie (araragisan : integer) : integer; var arararagisan : kamimashita,

output of zahlentheorie(1000000)

1. function zahlentheorie (araragisan : integer) : integer; var arararagisan : kamimashita, chigau, kamimamita : integer; 3. array [1..1000000] of integer = (0,0,0...0); 4. 5. begin 6. chigau:=0; for kamimashita:=1 to araragisan do begin for kamimamita := 1 to kamimashita do begin 7. 8. 9. if kamimashita mod kamimamita = 0 then 10. inc (arararagisan [ kamimashita]); 11. end; 12. end; for kamimashita :=1 to araragisan do begin if arararagisan [kamimashita] mod 2 = 1 then inc (chigau); 13. 14. 15. 16. end; 17. zahlentheorie := chigau; 18. end; 234

Step by Step Solution

3.40 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The program fails to compile due to errors However the code runs ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!