Aggiorna test.c
This commit is contained in:
parent
96c5a78739
commit
84bcb9fb2e
1 changed files with 21 additions and 28 deletions
49
test.c
49
test.c
|
|
@ -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);
|
||||
}
|
||||
|
||||
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 testicolo(char *input, char *output) {
|
||||
strcpy(output, input);
|
||||
for (int a = 0; a < 1000; a++) {
|
||||
parseH(output);
|
||||
parseL(output);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue