bsc

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

R_Prac-5.r (384B)


      1 # Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 25 Mar 2026
      2 # Repo: https://github.com/notamitgamer/bsc
      3 # License: MIT
      4 
      5 # Program to count the number of even numbers stored inside a vector of numbers.
      6 
      7 print("Enter your numbers: ")
      8 nums <- as.integer(scan())
      9 count = 0
     10 for(i in nums)  {
     11     if(i %% 2 == 0) {
     12         count = count + 1
     13     }
     14 }
     15 print(paste("Even Count=", count))
© 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