From f4f473b94956806bc98962712653a7c4f766cebe Mon Sep 17 00:00:00 2001 From: PanSi21 Date: Sun, 5 Jan 2025 00:53:27 +0100 Subject: [PATCH] Aggiorna test.c --- test.c | 66 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/test.c b/test.c index 4682846..8e57a1c 100644 --- a/test.c +++ b/test.c @@ -1,41 +1,39 @@ -#include -#include -uint64_t fibonacci( void ) { - const int n = 25000; - uint64_t a = 0, b = 1, c; +#include +#include +#include - for (int i = 2; i <= n; i++) { - c = a + b; - a = b; - b = c; - } +/* run this program using the console pauser or add your own getch, system("pause") or input loop */ - return b; -} - - -char* fibonacci_gmp() { - const int n = 25000; - static char result[10000]; // Assicurati che sia abbastanza grande per contenere il numero - mpz_t a, b, c; +int fibonacci(int argc, char *argv[]) { - mpz_init_set_ui(a, 0); - mpz_init_set_ui(b, 1); - mpz_init(c); + char c[] = "qwertyuiopasdfghjkllzxcvbnm123456789mnbvcxzlkjhgfdsapoiuytrewq1234567890"; + + for(int a=0;a<100000;a++){ + parseH(&c); + parseL(&c); + printf("%s",c); + } - for (int i = 2; i <= n; i++) { - mpz_add(c, a, b); - mpz_set(a, b); - mpz_set(b, c); - } - - mpz_get_str(result, 10, b); - - mpz_clear(a); - mpz_clear(b); - mpz_clear(c); - - return result; + return 0; } + +void parseH(char *p){ + int ln=strlen(p); + for(int a=0; a96){ + p[a]=p[a]-32; + } + } + +} + +void parseL(char *p){ + int ln=strlen(p); + for(int a=0; a64){ + p[a]=p[a]+32; + } + } +}