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."))
Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)