Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
tes
// Equations of a Circle #include <iostream> using namespace std; const double pi = 3.14159; const char newline = '\n'; int main () { double r=25; // double r=(insert specified radius here); double Circumference; double d=2*r; double Area; cout << "Please do not mess with any of the functions or what I have written."; cout << '\n'; cout << "r = "; cout << r; cout << " cm"; cout << '\n'; cout << "d = "; cout << d; cout << " cm"; cout << '\n'; Circumference = 2*pi*r; // The actual equation for circumference. cout << "Circumference = "; cout << Circumference; // Prints the answer. cout << " cm"; cout << '\n'; Circumference = pi*d; // The actual equation for circumference again. cout << "Circumference = "; cout << Circumference; // Prints the answer again. cout << " cm"; cout << '\n'; Area = 2*pi*(r*r); // The actual equation for area of a circle. cout << "Area = "; cout << Area; // Prints the answer again. cout << " cm^2"; cout << '\n'; }using namespace std; #include <iostream> int main() { std::cout << "Welcome to C++"; return 0; } #include <iostream> using namespace std; int main() { cout << "Welcome to C++"; return 0; }
run
|
edit
|
history
|
help
0
Get smallest dividers
next greater palindrome
Kolokwium_2011_z12
C++ Car Racing game framework
Compatibilità
Q
Treap for spoj : MEANARR (we can use policy based data structures instead)
GCC bug #79511
2015(M2)Mod.
TempBubbleDouble