[ create a new paste ] login | about

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

C++, pasted on Jan 28:
1
2
3
4
5
6
7
8
9
public static int suma(int a, int b) {
    if (b == 0) {
        return a;
    } else if (a == 0) {
                  return b;
    } else {
        return 1 + suma(a, b - 1);
    }
}


Output:
1
2
Line 1: error: expected unqualified-id before 'public'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: