Jump to content

Floyd's triangle: Difference between revisions

m
→‎{{header|R}}: Syntax highlighting.
m (→‎{{header|Phix}}: added syntax colouring, marked p2js compatible)
m (→‎{{header|R}}: Syntax highlighting.)
Line 5,070:
=={{header|R}}==
If it weren't for the printing requirements, we could do this in one line.
<lang Rrsplus>Floyd <- function(n)
{
#The first argument of the seq call is a well-known formula for triangle numbers.
331

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.