Question: QUESTION 1 Write a C++ program with the following specifications: a. Define a C++ function (name it function StudentID where StudentID is your actual student

 QUESTION 1 Write a C++ program with the following specifications: a.

QUESTION 1 Write a C++ program with the following specifications: a. Define a C++ function (name it function StudentID where StudentID is your actual student ID number) that has integer input (N) and double input (x) and returns a double output y, where N y = (x2 + n + x) n+ 5 n=1 N is a positive integer. b. In the main function, i. Read user input N from the command window (console), while ensuring that Nis positive (>0). If the user enters a negative number, the program should request the user to re-enter a positive (>0) number until a valid number is entered. ii. Use the above function (function StudentID) to determine the value of y for the user input N when x=2.0. Display the result using 4 decimal values. iii. Using the above function and a for loop, display the values of y for N values from 1 to 4 (1,2,3,4) when x=2.0. Display the results using 4 decimal values. Save your C++ program as quiz3_studentID.cpp where studentID is your actual 8- digit student ID. Upload your C++ file (Quiz3_StudentID.cpp) to VUWS. Verify that your submission is visible on your assignments in VUWS. QUESTION 1 Write a C++ program with the following specifications: a. Define a C++ function (name it function StudentID where StudentID is your actual student ID number) that has integer input (N) and double input (x) and returns a double output y, where N y = (x2 + n + x) n+ 5 n=1 N is a positive integer. b. In the main function, i. Read user input N from the command window (console), while ensuring that Nis positive (>0). If the user enters a negative number, the program should request the user to re-enter a positive (>0) number until a valid number is entered. ii. Use the above function (function StudentID) to determine the value of y for the user input N when x=2.0. Display the result using 4 decimal values. iii. Using the above function and a for loop, display the values of y for N values from 1 to 4 (1,2,3,4) when x=2.0. Display the results using 4 decimal values. Save your C++ program as quiz3_studentID.cpp where studentID is your actual 8- digit student ID. Upload your C++ file (Quiz3_StudentID.cpp) to VUWS. Verify that your submission is visible on your assignments in VUWS

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 Databases Questions!