CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
using namespace std;
int main() {
float rad;
float result;
const float pi = 3.14;
cout << "What is the radius? ";
cin >> rad;
cout << rad << endl;
result = pi * rad * rad;
cout << "Area = " << result << endl;
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run