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

  Optimization is to add a sorting algorithm

The second optimization is to add a sorting algorithm. Each time you add an item to the array (from disk or from keyboard), you call a function called SortMyArray(), which use the bubble sorting algorithm to sort the array in the ascending order, ..

  Write function that finds the minimum of three double value

1. Write a function that finds the minimum of three double values. This function should use another function that finds the minimum of two double values.

  Write song playlist class-object-oriented design principles

Write a song playlist class in C++ called "PlayList" using object-oriented design principles. The playlist should support the following ADT.The implementation should be based on an array of strings to store the song titles.

  Make a class employee

Make a class EMPLOYEE with a name and salary. Make a class MANAGER inherit from EMPLOYEE. Add an instance field, named DEPARTMENT

  Program to check compatibity for matrix multiplication

Write down program in C++ for matrix multiplication. Program must accept dimension of both matrices to be multiplied and check for compatibity.

  Write an lc-3 machine language program

Write an LC-3 machine language program starting at location x3000 which divides the number in memory location x4000 by the number in memory location x4001 and stores the quotient at x5000 and the remainder at x5001.

  Data from the file grocery.dat

Read the data from the file Grocery.dat and assign values to the 10  GroceryItem  objects. Next display these items to allow a customer to select grocery items from the list and indicate the quantity of that item he or she would like to order. When t..

  Computer programming techniques

Construct a program from a design and use appropriate functions

  We wish to process survey results

Suppose we wish to process survey results that are stored in a file. This exercise requires twoseparate programs. First, create a program that prompts the user for survey responses and outputseach response to a file

  Program to input the length of the side from the keyboard

write a program to input the length of the side from the keyboard ,use the class to obtain the areas of all shapes and display the results on the screen

  Write a program to convert between rectangular

Write a program to convert between rectangular and cylindrical coordinates, based upon user input. For example, if the user wants to convert cylindrical to rectangular coordinates, the user would input r, ?, z values and the program would output x, y..

  Create a global array of structures

Create a global array of structures with the following data. Each structure should store the data (Employee Table - Name, age, salary information) . Array size must be at least 10

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