Question: programming language Google x CW 3 - 2020 Spring Term (1 x 4 Dropbox - Submit files X C++ Program to Find All Rocx bhosted.cuny.edu/webapps/blackboard/execute/content/file?cmd=view&content_id=_44272181_1&course_id=_183957

programming language

programming language Google x CW 3 - 2020 Spring Term (1 x

Google x CW 3 - 2020 Spring Term (1 x 4 Dropbox - Submit files X C++ Program to Find All Rocx bhosted.cuny.edu/webapps/blackboard/execute/content/file?cmd=view&content_id=_44272181_1&course_id=_183957 1/ CLASS WORK - W3 Label it CW-3.cpp // Description: Write a program that will find the sum from A to B when the user enters both A and B. 17 1/ 1. Declare the needed variables // 2. Collect the user input 1/ 3. Determine if the inputs are valid: A - B 11 4. For correct values of A and B, output the sum. // #include using namespace std; // Header file needed for I/O // Line used for simplicity int main() 17 1. Declare the variables needed for this program. enter 17 2. Collect the user input needed for these two variables // 3. Check if he values are correct. A must be greater or equal to B otherwise exit the program. This requires an IT STATEMENT // 4. If the values are ok compute the sum. / // Extra PPTIONAL - Extra Credit) // On a separate .cpp file, label it CW3-extra.cpp // Write a program to compute the factorial of a number. // Recal that n! - n(n-1)(n-2)(n-3)...(2) (1) // Ex: 4! - (4) (3) (2) (1) - 24 // // 1. Let the user input a number n. // 2. If the number is not positive exit the program 113. For valid values of n, compute n! 14. Output a final message with the value of nl 11----- return 0

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!