Skip to content · ⁨דלג לתוכן⁩

Above average · ⁨מעל הממוצע⁩

English

Above average

Two loops, one after the other: the first works out the average, the second keeps the numbers above it.

This joins two patterns you have already used, the running total and the filter. Solving a problem in stages like this is how most longer programs are built.

עברית

מעל הממוצע

שתי לולאות, אחת לאחר השנייה: הראשונה מחשבת את הממוצע, השנייה שומרת את המספרים שמעליו.

זה מאחד שני דפוסים שכבר השתמשת בהם, הסכום הרווי ומסנן. פתרון בעיה בשלבים כזה הוא הבסיס לבנייתם של רוב התוכניות הארוכות יותר.

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP