R_Prac-2.r (183B)
1 # Check whether a number is even or odd. 2 3 num <- readline(prompt="Enter the number: ") 4 num <- as.integer(num) 5 print(paste(num, "is", ifelse(num %% 2 == 0, "EVEN", "ODD"), "number."))
bscComprehensive codebase and cou... | |
| Log | Files | Refs | Activity | README | LICENSE |
R_Prac-2.r (183B)
1 # Check whether a number is even or odd. 2 3 num <- readline(prompt="Enter the number: ") 4 num <- as.integer(num) 5 print(paste(num, "is", ifelse(num %% 2 == 0, "EVEN", "ODD"), "number."))