bsc

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

R_Code-4.r (477B)


      1 # Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 19 Mar 2026
      2 # Repo: https://github.com/notamitgamer/bsc
      3 # License: MIT
      4 
      5 # Write a standard if...else block that checks if a variable named 
      6 # age is greater than 18. If the condition is true, print "You are eligible to vote.", 
      7 # otherwise print "You cannot vote.". 
      8 
      9 age <- -1
     10 if (age < 0) {
     11     print("Not a valid age.")
     12 } else if (age < 18) {
     13     print("Not eligible to vote.")
     14 } else {
     15     print("Eligible to vote.")
     16 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror