bsc

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

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

R_Code-12.r (385B)


      1 # Write a custom function named calculate_area that takes 
      2 # two parameters: length and width. The width parameter should have 
      3 # a default value of 5. The function should print the product of the 
      4 # two parameters. Finally, call your function passing only the value 12 for the length. 
      5 
      6 calculate_area <- function(length, width = 5) {
      7     print(length * width) 
      8 }
      9 
     10 calculate_area(12)
© 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