Aggiorna test.c

This commit is contained in:
Fransisco Moles 2025-01-05 00:57:02 +01:00
parent 96c5a78739
commit 84bcb9fb2e

49
test.c
View file

@ -1,39 +1,32 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
void parseH(char *p);
void parseL(char *p);
int fibonacci(int argc, char *argv[]) {
char c[] = "qwertyuiopasdfghjkllzxcvbnm123456789mnbvcxzlkjhgfdsapoiuytrewq1234567890";
for(int a=0;a<100000;a++){
parseH(&c);
parseL(&c);
printf("%s",c);
void testicolo(char *input, char *output) {
strcpy(output, input);
for (int a = 0; a < 1000; a++) {
parseH(output);
parseL(output);
}
return 0;
}
void parseH(char *p){
int ln=strlen(p);
for(int a=0; a<ln; a++){
if(p[a]<123 && p[a]>96){
p[a]=p[a]-32;
}
}
}
void parseL(char *p){
int ln=strlen(p);
for(int a=0; a<ln; a++){
if(p[a]<91 && p[a]>64){
p[a]=p[a]+32;
void parseH(char *p) {
int ln = strlen(p);
for (int a = 0; a < ln; a++) {
if (p[a] < 123 && p[a] > 96) {
p[a] = p[a] - 32;
}
}
}
void parseL(char *p) {
int ln = strlen(p);
for (int a = 0; a < ln; a++) {
if (p[a] < 91 && p[a] > 64) {
p[a] = p[a] + 32;
}
}
}