bsc

Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)

git clone https://github.com/notamitgamer/bsc.git
· rebuilt hourlyOpen on GitHub
root / semester_1 / R / Code / R_Prac-4.r

R_Prac-4.r (275B)


      1 # Program to add two numbers in R program.
      2 
      3 num1 <- as.double(readline(prompt="Enter 1st number: "))
      4 num2 <- as.double(readline(prompt="Enter 2nd number: "))
      5 if(is.na(num1) || is.na(num2)) {
      6     stop("You did not enter a valid number.")
      7 }
      8 print(paste("Result", num1 + num2))