Question: Write a C + + program that will take a number, say n > = 0 , as input and output 1 + 4 +

Write a C++ program that will take a number, say n>=0, as input and output 1+4+7+10+...(3n+1). For example, if n is 4, then your program will compute 1+4+7+10+13 and output the sum of the series which is 35. Attach and upload your program source file (.cpp file).
Upload

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!