R Program to get input from user and print on Console

Program

my.name <- readline(prompt = "Please enter your name: ")
my.age <- readline(prompt = "Please enter your age: ")
my.age <- as.integer(my.age)
print(paste("My name is", my.name, "I am", my.age, "of age"))

Output

Please enter your name: John
Please enter your age: 28
[1] "My name is John I am 28 of age"