bsc

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

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

R_Code-11.r (401B)


      1 # Write a while loop that starts with a multiplier of 1. 
      2 # The loop should multiply the current multiplier by 4, 
      3 # assign it to a result variable, and print the result. 
      4 # The loop should exit if the result exceeds 100; otherwise, 
      5 # increment the multiplier by 1. 
      6 
      7 num = 1 
      8 while(TRUE) {
      9     result <- num * 4
     10     print(result)
     11     
     12     if (result > 100) {
     13         break
     14     }
     15     num = num + 1
     16 }
© 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