Пример #1
0
int
main(int argc, char *argv[])
{
  newlines_on();
  printf ("Hello world\n");
  printf ("This code is running on the VideoCore4!\n");

  approximate_pi();

  return 0;
}
Пример #2
0
int main(int argc, char* argv[])
{
    // math demo
    printf("*** MATH DEMO ***\n");
    double x = 0.31415926;
    double result = sin(x);
    printf("The sine of %lf is %lf\n\n", x, result);

    // custom libraries demos
    printf("*** CUSTOM LIBRARY DEMO: LAMENT ***\n");
    lament();

    printf("*** CUSTOM LIBRARY DEMO: PI ***\n");
    std::cout << "Approximation to PI: " << approximate_pi() << std::endl;

    return 0;
}