/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/ /* [wxMaxima: title start ] Prozentwertberechnung [wxMaxima: title end ] */ /* [wxMaxima: section start ] Problembeschreibung [wxMaxima: section end ] */ /* [wxMaxima: comment start ] Gegeben ist eine Liste von Beispielen mit Betrag und Prozentsatz. Der jeweilige Prozentwert ist zu bestimmen. [wxMaxima: comment end ] */ /* [wxMaxima: section start ] Problemlösung [wxMaxima: section end ] */ /* [wxMaxima: comment start ] EINGABE [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ angabe:read("Liste mit [Betrag,Prozentsatz]"); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] VERARBEITUNG [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ n:length(angabe); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] AUSGABESCHLEIFE [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ for i:1 thru n do print(angabe[i][1]*angabe[i][2]/100.0); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] LISTENVERARBEITUNG [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ prozentwert:makelist(angabe[i][1]*angabe[i][2]/100.0,i,1,n); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] AUSGABE [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ print("Die Prozentwerte sind",prozentwert)$ /* [wxMaxima: input end ] */ /* Maxima can't load/batch files which end with a comment! */ "Created with wxMaxima"$