R Program to print a table of any number
In this program, You will learn how to print a table of any number in R.
14 28 42 56 70 84 98 112 126 140
Example: How to print a table of any number in R
{
t <- as.integer(readline(prompt = "Enter a Number :"))
for (num in 1:10) {
print(paste(num * t))
}
}
Output:
Enter a Number :4
[1] "4"
[1] "8"
[1] "12"
[1] "16"
[1] "20"
[1] "24"
[1] "28"
[1] "32"
[1] "36"
[1] "40"