+ 1
How to print stars?
You need to create a function that takes a number X as its parameter and outputs X stars using the asterisk symbol *. x <- readLines('stdin') x <- as.integer(x[1]) #define the function stars(x) <- function(x) { result <- "*" } print(result)
2 Antworten
+ 2
You should use a loop to print stars as much as input.
Here, you can check. Happy coding!
https://code.sololearn.com/c51L1zfgH3Hi/?ref=app
+ 2
You can use a for loop and print the * for each iteration.