ladytndreynoeman ladytndreynoeman
  • 09-02-2017
  • Computers and Technology
contestada

Given a double variable named areaofsquare write the necessary code to read in a value , the area of some square, into areaofsquare and print out the length of the side of that square.

Respuesta :

antonsandiego
antonsandiego antonsandiego
  • 15-02-2017
I guess you need solution on C++. Here is the code:

int main () {    double areaofsquare;    double length    cin >> areaofsquare;
length = sqrt(areaOfSquare);
 
std::cout << length << std::endl;
       if(areaofsquare >= 0)    {     sqrt(areaofsquare);     cout << areaofsquare << endl;          }      else     { cout << "INVALID" << endl;              } 
      }
Answer Link

Otras preguntas

Which of these transitions would be used to show sequence? Meanwhile Coupled with Unexpectedly In comparison
I need help making this paragraph longer......It's parts of a descriptive essay about my time at the SwS concert last year
What images make the setting of the confrontation between Gawain and the Green Knight seem demonic? How is the setting symbolic? Explain your answers using exam
plz answer these questions
A TV that usually sells for $173.67 is on sale for 15% off. If sales tax on the TV is 8%, what is the price of the TV, including tax? A. $211.53 B. $160.9
What is the pattern to find the missing numbers in each table?
How do i prove lines are parallel
For every decision you make, there is a trade-off. true or false
What process transform solar energy into chemical energy?
Name an angle adjacent to ∠DGEChoices:∠FGI∠EGH∠HGJ