Question: Create a program that sums all odd numbers between a and b (inclusive) using a for loop , where a and b are inputs. If
Create a program that sums all odd numbers between a and b (inclusive) using a for loop, where a and b are inputs. If a is greater than b, start from b instead.
Example Output:
With 2 given as input a and 6 given as input b
Please give a start number: 2 Please give an end start number: 6 The sum of all odd numbers between a and b (inclusive) is: 8
-- Please use C++ --
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
