• עקבו אחרינו בטוויטר וברשתות חברותיות כדי להתעדכן בשינויים, אם האתר לא זמין, תקלות ועוד: טוויטר
  • שימו לב, אפשר כעת לתרום זוזין רק מ500 זוזין, ויש עמלה של 10% על הצד התורם בעת התרומה, אז עדיף להרוויח לבד בלי להסתמך על תרומות.
    שקל אחד שווה ל100 זוזים בחנות.

    אשכול אחד - 10 זוזין
    הודעה אחת שכתבת - 5 זוזין
    הודעה אחת שכתבו לך באשכול שלך - 1 זוזין
    נקודות פגות לאחר שבוע.

דיון מה דעתך על הסינתקס הבא בתור שפת תכנות ידידותית למתחילים

ManOfSpam

טירון
ספט׳ 8, 2026
318
109
1
Zuzin
806
קוד:
NOTE: This program calculates the factorial of a number in two different ways

Define fact_it for n:
    If n is less than 0:
        Print "Invalid Argument" with newline
        Return -1
    Let result be 1
    Repeat for i between 2 and n:
        Set result to times i
    Return result

Define fact_rec_wrap for n:
    If n is less than 0:
        Print "Invalid Argument" with newline
        Return -1
    Return fact_rec of n

Define fact_rec for n:
    If n is 0 or n is 1:
        Return 1
    Return n times fact_rec of n minus 1

Define main:
    Be n
    Print "Choose an integer:" with newline
    Read n
    Let x be fact_it of n
    Let y be fact_rec_wrap of n
    Print x with newline
    Print y with newline
    If x is y:
        Print "Kiiiiin" with newline
        Return 0
    Return -1