fork(1) download
  1. #include <cstdio>
  2. #include <cmath>
  3.  
  4. typedef double(*unko_t[])(double);
  5. unko_t table{ &std::sin, &std::cos, &std::tan };
  6.  
  7. auto main() -> int
  8. {
  9. std::printf("%.2lf\n", table[1](3.1 / 4));
  10. }
  11.  
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
0.71