C'č qualcuno??? Chi mi aiuta??
č questo il programma:
program sompd;
Uses crt;
var val,somp,somd:integer;
begin
textcolor(yellow); textbackground(red);
clrscr;
somp:=0;
somd:=0;
writeln('inserisci una serie di valori ');
readln(val);
while val<>999 do
begin
if val<999 then
if ((val mod 2)=0) then
somp:=somp+val
else
somd:=somd+val;
readln(val);
end;
writeln('la sooma dei numeri pari e''',somp);
writeln('la somma dei numeri dispari e''',somd);
readln();
end.
Ultima modifica effettuata da totipianurese il 10/06/2008 alle 14:46 |