Write a c++ program that prompts the user for a double

Assignment Help C/C++ Programming
Reference no: EM13166024

 Write a C++ program that prompts the user for a double that is either positive or negative. If positive it prints the square root in a statement for example The sqrt(49) = 7. If the number is negative it will take the absolute value of the number and then print the imaginary value. For example, The sqrt(-49) =7i. 

Reference no: EM13166024

Questions Cloud

You have just upgraded your system : You have just upgraded your system to a "fast and wide" SCSI interface. This system has a floppy disk, a CD-ROM and five 8-gigabyte fixed disks. What is the device number of the host adapter? Why?
Calculate the final temperature of the mixture : A 31.0-g sample of water at 270. K is mixed with 51.0 g water at 340. K. Calculate the final temperature of the mixture assuming no heat loss to the surroundings.
State hemoglobin is the protein that transports : Hemoglobin is the protein that transports O2through the blood from the lungs to the rest of the body. In doing so, each molecule of hemoglobin combines with four molecules
Given separate instruction and data cache units : Given separate instruction and data cache units, the MIPS ISA, an instruction cache miss rate of 15%, a data cache miss rate of 20%, and a miss penalty (for both cache units) of 5 clock cycles, what are the AMAT in cycles per access of the.
Write a c++ program that prompts the user for a double : Write a C++ program that prompts the user for a double that is either positive or negative.
Intrinsic fundamental nature : I pursue the inner, hidden reality, the very essence of objects in their own  intrinsic fundamental nature.” The author of this statement might have  illustrated it with what work of his or her own?
Grond state to its first electronically excited state : A magnesium goes from its grond state to its first electronically excited state. I assume the ground state is a singlet.
Wrie a program that will generate a list of 10000 numbers : Wrie a program that will generate a list of 10000 numbers stored in an array with values 1 and 500.Print out any original 200 numbers to show the results(not one number per line either).Now sort the number using bubble sort
Derive from g1 10b + (a * (a + b000)) {build a tree} : 1.      Given grammar G1 uses variables S, and T where alphabet T={+, ?, (, ), a, b,0, 1} with rules

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Write c program to add two integers and prints out average

Write a C program that prompts for a variable number of integers, adds them up, and prints out the average. The user will enter either an integer to be averaged.

  Prepare a program that uses the pthread library

Prepare a C/C++ program that uses the PTHREAD library to create threads and mutexes to synchronize them.

  Compares the number of possible sequences

A c++ program that compares the number of possible sequences of the length L that can be generated uinder the following assumptions. Given an alphabet of size N=9. The program must output a formatted list comparing the number of possible sequences..

  Write a program that allows users to enter a dollar amount

Write a program that allows users to enter a dollar amount for their bank account balance at the beginning of the month.

  Use the convention that all years have 360 days

In writing the days() function, use the convention that all years have 360 days and each month consists of 30 days. The function should return the number of days for any Date structure passed to it. Write a main () function to test your function.

  Calculates the sum of the cube roots of two integers.

Wrtie a program that calculates the sum of the cube roots of two integers. The program should use the following functions as well as a main funcion. 1) enter one positive value 2) compute the cube root of one integer 3) report the value of two intege..

  Stores a series of numbers in a binary tree.

Queue Converter, Write a program that stores a series of numbers in a binary tree. Then have the program insert the values into a queue in ascending order. Dequeue the values and display them on the screen to confirm that they were stored in the prop..

  Time conversion

Write a C++ program that takes an Eastern standard time in hours, minutes, and seconds,and prints it out in Central time, Mountain time, or Pacific time.

  Braces for blocks of code

C-- should have braces for blocks of code, an if statement, while statement, and a double, int, and character. Each statement ends with a semi-colon and you must have a main routine

  Function that returns the height of a binary tree

Write a function called getHeight() that returns the height of a given binary tree - CptS 122 Write a function called countSmallerThan() that returns the number of nodes whose values are smaller than the supplied input paramter

  Bare in mind this is a program

Bare in mind this is a program with the audience being lawncare and landscaping people. So the events will generally be to know how often a client wants their lawn mowed.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd