All pastes #1351769 Raw Edit

[phear]crippler

public cpp v1 · immutable
#1351769 ·published 2009-03-03 08:16 UTC
rendered paste body
/*AUTHOR: [phear]cripplerFILE: circumference.cppPURPOSE: computes circumference of a circle when diameter is known.*/#include <iostream>using namespace std;double cir(double d);int main()   {	cout << "This program can calculate the circumference of a circle\nwhen the diameter is known.\n" << endl;		double d;	char again;	cout.precision(4);	do {		cout << "Enter the diameter: ";		cin >> d;		cout << "The circumference is: " << cir(d) << endl;		cout << "Do another? (Y/N): ";		cin >> again; 		cout << endl;	} while(again == 'y' || again == 'Y');	return 0;}double cir(double d = 0.0){   return 3.14159 * d;   }