Q:

Write a R program to take input from the user (name and age) and display the values. Also print the version of R installation

0

Write a R program to take input from the user (name and age) and display the values. Also print the version of R installation.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

name = readline(prompt="Input your name: ")
age =  readline(prompt="Input your age: ")
print(paste("My name is",name, "and I am",age ,"years old."))
print(R.version.string)

Sample Output:

Input your name: 
Input your age: 
[1] "My name is  and I am  years old."
[1] "R version 3.4.4 (2018-03-15)" 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now