A triangular number is defined as m(m + 1)/2 for m = 1, 2, c , and so on. Therefore, the first few numbers are 1, 5, 12, 22, . . . . Write a function with the following header that returns a triangular number:
int getTriangularNumber(int n)
Write a test program that uses this function to display the first 75 triangular numbers with 5 numbers on each line.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here