bartleby

Videos

Textbook Question
100%
Book Icon
Chapter 3, Problem 12SA

What is the output of the following program? (2, 3, 6, 8)

#include <iostream>

#include <cmath>

#include <string>

#include <iomanip>

using namespace std;

int main()

{

     double x, y;

     string str;

     x = 9.0;

     y = 3.2;

     cout << fixed << showpoint << setprecision (2);

     cout << x << "^" << y << " = " << pow(x, y) << endl;

     cout << "5.0^2.5 = " << pow(5.0, 2.5) << endl;

     cout << "sqrt (48.35) = " << sqrt (48.35) << endl;

     cout << "static_cast<int>(sqrt(pow (y, 4))) = "

     << static_cast<int>(sqrt(pow (y, 4))) << endl;

     str = "Predefined functions simplify programming code!";

     cout << "Length of str = " << str.length() << endl;

     return 0;

}

Blurred answer
Students have asked these similar questions
show all the work
List down the strenghts and weaknesses of your team project for Capsim Simulation? Explan.
Capsim Team PowerPoint Presentations - Slide Title: Key LearningsWhat were the key learnings that you discovered as a team through your Capsim simulation?
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
What Are Data Types?; Author: Jabrils;https://www.youtube.com/watch?v=A37-3lflh8I;License: Standard YouTube License, CC-BY
Data Types; Author: CS50;https://www.youtube.com/watch?v=Fc9htmvVZ9U;License: Standard Youtube License