[Solved] SOLVED: Program that will help to figure out and display the first twenty numbers of the pattern

$25

File Name: SOLVED:_Program_that_will_help_to_figure_out_and_display_the_first_twenty_numbers_of_the_pattern.zip
File Size: 904.32 KB

SKU: [Solved] SOLVED: Program that will help to figure out and display the first twenty numbers of the pattern Category: Tag:
5/5 - (1 vote)

James has written a number pattern that begins with 1, 5, 14, and 30. Write a C++ program that will help James to figure out and display the first twenty numbers of the pattern; for each number, its corresponding ordinal number must be displayed as well, in a tabular format (see sample run below). The program will then, at the users choice entered at the run time, figures out and displays any particular number, with its corresponding ordinal number, in the pattern. For the users interest to find another number, allow the program to loop back continuously for any other element in the pattern to be revealed. Lastly, your full name must be displayed on screen before the ending of the program. Validate your input value so that your program wont be crashed at run time by any reason. If it crashed there will be no credit, or 0 point. the formula is: number=(n(n+1)(2n+1))/6 and n is the order Sample run: Your output must be similar to the following: The first twenty numbers in the pattern: Order Number 1st 1 2nd 5 3rd 14 4th 30 Whats the ordered element in the pattern that you wanted to find? (Or enter 0 to end): 31 The 31st element is: 10416 Whats the ordered element in the pattern that you wanted to find? (Or enter 0 to end): 4300 The 4300th element is: 741775274 Whats the ordered element in the pattern that you wanted to find? (Or enter 0 to end): 52 The 52nd element is: 48230 Whats the ordered element in the pattern that you wanted to find? (Or enter 0 to end): 0 GOOD BYE! Programmer: Your Full Name Press key to end Expert Answer

Rate this product

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED: Program that will help to figure out and display the first twenty numbers of the pattern
$25