tableOfTrig[upper_] := Module[{m, range, t1, t2},
m = Table[ Integrate[Sin[theta]^r Cos[theta]^s, {theta, 0, upper}], {r, 0, 5}, {s, 0, 5}] ;
Grid[m] ;
range = Array[#-1&, 5+1] ;
t1 = Prepend[m,range] ;
Grid[t1] ;
blankAndRange = Prepend[ range, ""] ;
t2=MapThread[Prepend,{t1,blankAndRange}] ;
Grid[t2]
]
tableOfTrig[ Pi/2 ]
tableOfTrig[ Pi ]