bsc

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

root / semester_1 / R / Code / R_Prac-5.r

R_Prac-5.r (258B)


      1 # Program to count the number of even numbers stored inside a vector of numbers.
      2 
      3 print("Enter your numbers: ")
      4 nums <- as.integer(scan())
      5 count = 0
      6 for(i in nums)  {
      7     if(i %% 2 == 0) {
      8         count = count + 1
      9     }
     10 }
     11 print(paste("Even Count=", count))
© 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