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
icon
Related questions
Question
I need the answer quickly
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.
ser.
Transcribed Image Text: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. ser.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr