Witam, mam do zrobienia program, który będzie się pytał 10 razy o liczbę, po podaniu liczył sumę i lioczyn, a następnie dzielił sumę przez iloczyn. Początek będzie taki:
Kod:
Program liczby; USES CRT; var i:integer; Begin clrscr; for i:=1 to 10
Nie wiem co dalej Pomożecie? DZiękuję
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
Program liczby; USES CRT; var i:integer; suma :longint; liczba:longint; iloczyn:longint; wynik:real; Begin clrscr; iloczyn:=1; for i:=1to10dobeginreadln(liczba); suma:=suma+liczba; iloczyn:=iloczyn*liczba; end; wynik:=suma div iloczyn; writeln(wynik); readln; end.