Jump to content

User input/Text: Difference between revisions

Added R code
m (Link to related task)
(Added R code)
Line 446:
<lang python> number = float(input("Input a number: "))</lang>
float may be replaced by any numeric type, such as int, complex, or decimal.Decimal. Each one varies in expected input.
 
=={{header|R}}==
{{works with|R|2.81}}
 
<lang R>
stringval <- readline("String: ")
intval <- as.integer(readline("Integer: "))
</lang>
 
=={{header|Raven}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.