Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write A c++ programme Task 2 (45 pts] A quadratic series is generated using the following equation In = an+ bn + c where in

image text in transcribed

write A c++ programme

Task 2 (45 pts] A quadratic series is generated using the following equation In = an+ bn + c where in represents the nth term in the series and a, b and care fixed for a given series. For example if a = 1, b = 2 and c = 3 the series generated would be 3.6.11, 18, 27, 38.... Write a program that does the following: reads in four numbers, a, b, c and N from a file named input2.txt see the format shown in the example below). determines the sum of the first N (using N from the file) quadratic terms in the sequence specified by the parameters a, b and c above. The sum must be written to a file named output2.txt. The sum is computed using the following equation ST (2) For example if we read in a = 1, b = 2. c = 3 and N = 5 we would have S= T,= (n? + 2n + 3) = 3 + 6 + 11 +18+27 + 38 = 103 Example 1 Listing 3: input2.txt 1 2 3 5 Listing 4: output2.txt 103

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions