דילוג לתוכן
שאלה

Writing a loop with a condition

תצוגה מקדימה

מפתח התשובות מוצג למורים מחוברים.

Writing a loop with a condition

Write a short C# while loop that repeatedly reads an integer from the user with Console.ReadLine and Convert.ToInt32, and keeps asking until the number entered is between 1 and 100 inclusive. Describe the key parts: the loop condition and how the value is updated.


The loop should keep running while the input is invalid, so write the condition as the negation of the valid range, and make sure the variable is updated inside the body.

פרטים

אין תיאור עדיין.

מקצועות
c#
קהל יעד
תיכון · כיתות י׳–י״ב
רמת קושי
7 מתוך 10
שפה
אנגלית
מי יכול לראות
כולם
הושלם על ידי AI
מה שמסומן בניצוץ נוסף על ידי AI.
נוצר באמצעות AI
Claude Haiku 5.5
נוצר
עודכן
לפני 4 ימים

תגובות

  1. אין תגובות עדיין.
© כל הזכויות שמורות