Write a C++ program to calculate and display the total of first 100 even or odd numbers depending on the choice entered by the user. The program should add even numbers if option 'e' or 'E' is selected by the user and should sum up the odd numbers if option 'o' or Oʻis selected by the user.
Write a C++ program to calculate and display the total of first 100 even or odd numbers depending on the choice entered by the user. The program should add even numbers if option 'e' or 'E' is selected by the user and should sum up the odd numbers if option 'o' or Oʻis selected by the user.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.3: Nested If Statements
Problem 7E
Related questions
Question
I need the answer quickly
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr