1. Write a program that reads an integer from the user. Then your program should display a message indicating whether the integer is even or odd.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 14E
icon
Related questions
Question
1. Write a program that reads an integer from the user. Then your program should
display a message indicating whether the integer is even or odd.
2. A string is a palindrome if it is identical forward and backward. For example
"anna","civic","leveľ"and“hannah"are all examples of palindromic words. Write a
program that reads a string from the user and uses a loop to determines whether or
not it is a palindrome.
3. Write a program that reads integers from the user and stores them in a list.
Yourprogram should continue reading values until the user enters 0. Then it
should display all of the values entered by the user (except for the 0) in order from
smallest to largest,with one value appearing on each line.
4. Two words are anagrams if they contain all of the same letters, but in a
differentorder. For example, "evil" and “live" are anagrams because each contains
one 'e', one 'i', one l', and one 'v'. Create a program that reads two strings from
the user, determines whether or not they are anagrams.
5. Write a function that takes three numbers as parameters, and returns the median
value of those parameters as its result.
Transcribed Image Text:1. Write a program that reads an integer from the user. Then your program should display a message indicating whether the integer is even or odd. 2. A string is a palindrome if it is identical forward and backward. For example "anna","civic","leveľ"and“hannah"are all examples of palindromic words. Write a program that reads a string from the user and uses a loop to determines whether or not it is a palindrome. 3. Write a program that reads integers from the user and stores them in a list. Yourprogram should continue reading values until the user enters 0. Then it should display all of the values entered by the user (except for the 0) in order from smallest to largest,with one value appearing on each line. 4. Two words are anagrams if they contain all of the same letters, but in a differentorder. For example, "evil" and “live" are anagrams because each contains one 'e', one 'i', one l', and one 'v'. Create a program that reads two strings from the user, determines whether or not they are anagrams. 5. Write a function that takes three numbers as parameters, and returns the median value of those parameters as its result.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
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