1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
devlian [24]
3 years ago
6

Consider the following C++ program in which the statements are in the incorrect order. Rearrange the statements so that itprompt

s the user to input the radius of a circle and outputs the area and circumference of the circle-#include {int.main()cout << "Enter the radius: ':cin >> radius;cout << endl;double radius;double area;using namespace std;return 0;cout << "Area = ' << area << endl;area - PI * radius * radius;
Computers and Technology
1 answer:
choli [55]3 years ago
8 0

Answer:

The correct program to this question can be given as:

Program:

//header file

#include<iostream> //include header file

using namespace std;

//main

int main() //defining method main

{

double radius,area=0; //defining variables

double PI=3.14; //defining variable PI and assign value

cout <<"Enter the radius: "; //message

cin >> radius; //input value by user

area = PI * radius * radius; //formula to calculate area

cout << "Area: "<< area << endl; //print area

return 0;

}

Output:

Enter the radius: 3.0

Area: 28.26

Explanation:

In the above program code, a header file is included. In the next line, the main method is defined, which contain three double type variable that is "radius, area, and PI".

  • The radius variable is used to take input by the user, and the area variable is to calculate the area of the circle, and the PI is used to hold a constant value, which is "3.14".
  • After taking user input in radius variable the area variable has used the formula of the circle, which calculates a value and in the last print, the function uses "cout", that prints area variable value.
You might be interested in
Please NEED HELP ASAP WILL MARK BRAINLIEST ONLY #8
ValentinkaMS [17]

Answer:

I think its A

Explanation:

6 0
2 years ago
Whats the next lyric,i baked you a pie,pie,pie
eduard
“oh boy what flavor”
4 0
3 years ago
Read 2 more answers
The excessive use of the internet and the web for personal use at work is sometimes called ____ .
Elodia [21]
This is called Cyberslacking
7 0
3 years ago
Read 2 more answers
Which of the following is the core communications protocol for the internet? telnet ftp tcp/ip ssl
inna [77]
Tcp/ip is the core communication protocol for the internet
4 0
3 years ago
A _____ model is one that is automatically adjusted based on changing relationships among variables.
BabaBlast [244]

Answer: dynamically modified model

Explanation:

7 0
1 year ago
Other questions:
  • A ________ topology uses more than one type of topology when building a network. crossover multiple-use fusion hybrid
    11·1 answer
  • Select the correct answer.
    13·1 answer
  • ap csp The local, remote, and upstream _______ can each have multiple ___ _____. When a participant in a collaborative group on
    5·1 answer
  • The blank provides access to the internet May also be internal ??
    14·1 answer
  • 3. Why is human resource plan made​
    11·1 answer
  • Write a short essay on the importance of information and communication technology (ICT) in the AFN industry. Add suitable exampl
    11·1 answer
  • ____________ reference is used when you want to use the same calculation across multiple rows or columns.
    10·2 answers
  • Commercial technical data and commercial software:_________.
    11·1 answer
  • You are the system administrator for Precision Accounting Services, which employs 20 accountants and 25 accounting assistants. T
    13·1 answer
  • which endpoint application runs on an endpoint device that only detects an attack in an endpoint device? chqgg
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!