Skip to content · ⁨الانتقال إلى المحتوى⁩

Loops: while, for, and accumulation · ⁨الحلقات: while، for، والتراكم⁩

English

Repeating work

  • A loop runs the same block of code many times, so you don't copy it by hand.
  • C has three loops: while, for, and do-while. They all repeat while a condition is true.
  • The condition is checked each time around. When it becomes false, the loop stops.
العربية

تكرار المهام

  • الحلقة تُنفذ نفس كتلة البرمجة مرات عديدة، لتجنب نسخها يدوياً.
  • يحتوي C على ثلاث حلقات: while، for، وdo-while. جميعها تتكرر طالما أن الشرط صحيح.
  • يتم فحص الشرط في كل دورة. وعندما يصبح غير صحيح، تتوقف الحلقة.

Handout · ⁨ورقة عمل⁩

Log in or create account · ⁨تسجيل الدخول أو إنشاء حساب⁩

IGCSE, A-Level & AP