Slip 12 - E) Write an R Program to calculate Multiplication Table

Solution:

number <- as.integer(readline(prompt = "Please Enter a Number for Table"))

for( t in 1:10)
{
  print ( paste ( number, '*', t, '=', number * t))
}

Post a Comment

0 Comments