Skip to content

Commit bc623f3

Browse files
author
WinterPancake
committed
Fixed typo
1 parent 29403ed commit bc623f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/math/triangular_number.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Wikipedia Reference : https://en.wikipedia.org/wiki/Triangular_number
33

44
// This program provides a function to calculate the nth triangular number defined by T_n = 1 + 2 +
5-
// ... + n = (n^2 + 2)/ = n(n + 1)/2 = (n + 1) choose 2.
5+
// ... + n = (n^2 + 2)/2 = n(n + 1)/2 = (n + 1) choose 2.
66

77
//returns the nth triangular number
88
pub fn triangular_number(n: u64) -> u64 {

0 commit comments

Comments
 (0)