From c298ca7e6beaad0bcc32af6d4cf50d41b79f13b7 Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 21 Sep 2018 12:56:51 +0200 Subject: fix framebufffer/ textmode and clean userspace a little bit more --- userspace/test_math.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 userspace/test_math.c (limited to 'userspace/test_math.c') diff --git a/userspace/test_math.c b/userspace/test_math.c new file mode 100644 index 0000000..9327c19 --- /dev/null +++ b/userspace/test_math.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + time_t ltime; + time(<ime); + printf("the time is %s", ctime(<ime)); + + unsigned int seed=time(NULL); + printf("seed = %u\n",seed); + + srand(seed); + + for(int i=0;i<10;i++) + { + int r=rand()%100; + printf ("the random number is %i",r); + printf("sin(%i) = %f \n",r,sin(r)); + } + + + return 0; +} + + + + + -- cgit v1.2.3