bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / R / Code / R_Code-6.r

R_Code-6.r (350B)


      1 # Write a while loop with a number variable starting at 1. 
      2 # The loop should print the number and increment it by 1, 
      3 # but you must include an if statement with a break command to 
      4 # stop the loop's execution exactly when number == 6
      5 
      6 number <- 1
      7 while (TRUE) {
      8     if(number == 6) {
      9         break
     10     }
     11     print(number)
     12     number = number + 1
     13 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror