1) declare and initialize two variables of double type 2) calculate and display the square of them separatly
Added by Wayne O.
Close
Your feedback will help us improve your experience
Wei Yang and 82 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a C++ program to declare two integer and one float variables and assign 10, 15, and 12.6 to them respectively. It then prints these values on the screen.
Wei Y.
Write a C++ program to define a class for calculator with data members as number1 and number2 (both as double) and methods as add(), sub(), mul(), div(). Create an array of 5 objects of calculator. Use parameterized constructor to initialize the values. Display output of all four arithmetic operations
Christian O.
Give a C++ definition of a struct called Pair that consists of two members. The first is an integer called first, and the second is a double called second.
Patricia H.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD