Skip to main content
Commonmark migration
Source Link

##QBIC, 18 bytes

QBIC, 18 bytes

[:|Z=Z+!a$+!b-a+1$

Explanation

[:|       FOR a = 1 to n
Z=Z+      Add to Z$ 
!b$+      a cast of the loop counter as string
!b-a+1$   and a cast of (n+1) minus the loop counter to string
          Z$ is printed implicitly at the end of QBIC

##QBIC, 18 bytes

[:|Z=Z+!a$+!b-a+1$

Explanation

[:|       FOR a = 1 to n
Z=Z+      Add to Z$ 
!b$+      a cast of the loop counter as string
!b-a+1$   and a cast of (n+1) minus the loop counter to string
          Z$ is printed implicitly at the end of QBIC

QBIC, 18 bytes

[:|Z=Z+!a$+!b-a+1$

Explanation

[:|       FOR a = 1 to n
Z=Z+      Add to Z$ 
!b$+      a cast of the loop counter as string
!b-a+1$   and a cast of (n+1) minus the loop counter to string
          Z$ is printed implicitly at the end of QBIC
edited body
Source Link
steenbergh
  • 8.1k
  • 1
  • 25
  • 41

##QBIC, 18 bytes

[:|Z=Z+!b$+a$+!ab-b+1$a+1$

Explanation

[:|       FOR a = 1 to n
Z=Z+      Add to Z$ 
!a$+b$+      a cast of the loop counter as string
!b-a+1$   and a cast of (n+1) minus the loop counter to string
          Z$ is printed implicitly at the end of QBIC

##QBIC, 18 bytes

[:|Z=Z+!b$+!a-b+1$

Explanation

[:|       FOR a = 1 to n
Z=Z+      Add to Z$ 
!a$+      a cast of the loop counter as string
!b-a+1$   and a cast of (n+1) minus the loop counter to string
          Z$ is printed implicitly at the end of QBIC

##QBIC, 18 bytes

[:|Z=Z+!a$+!b-a+1$

Explanation

[:|       FOR a = 1 to n
Z=Z+      Add to Z$ 
!b$+      a cast of the loop counter as string
!b-a+1$   and a cast of (n+1) minus the loop counter to string
          Z$ is printed implicitly at the end of QBIC
Source Link
steenbergh
  • 8.1k
  • 1
  • 25
  • 41

##QBIC, 18 bytes

[:|Z=Z+!b$+!a-b+1$

Explanation

[:|       FOR a = 1 to n
Z=Z+      Add to Z$ 
!a$+      a cast of the loop counter as string
!b-a+1$   and a cast of (n+1) minus the loop counter to string
          Z$ is printed implicitly at the end of QBIC