[ create a new paste ] login | about

Link: http://codepad.org/AAAfDplF    [ raw code | fork ]

C++, pasted on Dec 15:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
using namespace std;
const float PI = 3.14;

float getPI( float n ) {
    return n * PI;
}

int main () {
    cout << getPI(1) << endl;
    cout << getPI(2) << endl;
    
    cout << getPI(23.5) << endl;
    
    cin.ignore();
    return 0;
}


Create a new paste based on this one


Comments: