26.0k views
5 votes
. Assign the value 7.5 to diameter. h. Assign 3.14159265359 to PI. i. Create a single line comment that says ""Calculating circumference and area of the circle"".

1 Answer

4 votes

Answer:

float diameter =7.5;

float PI=3.14159265359 ;

// Calculating circumference and area of the circle

Step-by-step explanation:

Here we declared two variable diameter and PI of float type and assigning the value 7.5,3.14159265359 respectively after that we making a single line comment by using //(forward) slash.

#include<iostream> //header file

using namespace std; // namespace

int main() // main method

{

float diameter =7.5; // Assign the value 7.5 to diameter

float PI=3.14159265359 ;//Assign 3.14159265359 to PI

// Calculating circumference and area of the circle.

return(0);

}

User Niraj Trivedi
by
8.3k points

Related questions

asked Mar 7, 2024 52.0k views
Segfault asked Mar 7, 2024
by Segfault
7.7k points
1 answer
3 votes
52.0k views
asked Jul 24, 2017 179k views
Razia Sultana asked Jul 24, 2017
by Razia Sultana
8.0k points
2 answers
2 votes
179k views
asked Jun 17, 2015 64.9k views
TeoREtik asked Jun 17, 2015
by TeoREtik
9.1k points
1 answer
3 votes
64.9k views