Question
1.
#include
2.
using namespace std;
3.
#define PI 3.14159
4.
int main ()
5.
{
6.
float r = 2;
7.
float circle;
8.
circle = 2 * PI * r;
9.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
#define PI 3.14159
4.
int main ()
5.
{
6.
float r = 2;
7.
float circle;
8.
circle = 2 * PI * r;
9.
cout
Answer: Option A
Was this answer helpful ?
In this program, we are finding the area of the circle by using concern formula.
Output:
$ g++ cons.cpp
$ a.out
12.5664
Was this answer helpful ?
Submit Solution