C++ for Engineers and Scientists
C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
Question
Book Icon
Chapter 4.5, Problem 1E
Program Plan Intro

Program plan:

  1. The variable num of type int is declared to store the entered number.
  2. A if statement is used to check the values of num for negative and zero values.
  3. An inbuilt function sqrt() is used to calculate the square root of the number.
  4. To calculate the reciprocal of num is divided by 1.0.

Program description:

The main purpose of the program is used to calculate the square root and reciprocal of a number.

Blurred answer
Students have asked these similar questions
C++ program chose the correct result for each of the following programming statements
My v and d are incorrect, please write the equations correctly.
State whether the following are true or false. If the answer is false, explain why.c) The expression (x > y && a < b) is true if either x > y is true or a < b is true.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr