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
4.9k points