In C Declare a variable of type double. - Ask the user for a value and place it in the declared variable. - Write code to check for and output statement stating whether the variable is zero, positive, or negative.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter5: Looping
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question

In C

Declare a variable of type double.
- Ask the user for a value and place it in the declared variable.
- Write code to check for and output statement stating whether the variable is zero, positive, or
negative.

- Declare a variable of type character.
- Ask the user for a letter and place it in the declared variable.
- Write code to check for and output statement stating whether the variable is an upper case
letter, lower case letter, or not a letter (neither of the above).

- Write a simple program that is a four function calculator that displays a menu with options a to add, s to subtract, m to multiply, and d to divide two numbers. Ask the user for two float variables in each operation and output the result.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Name constants and Literal values
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning