-
-
Save parzibyte/7406a1e00c69c36ab0de1c05e0f298bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
https://parzibyte.me/blog | |
*/ | |
#include <stdio.h> | |
#include <ctype.h> | |
int main() | |
{ | |
char nombre[] = "parzibyte"; | |
printf("Antes de intercalar: %s\n", nombre); | |
int i = 0; | |
for (i = 0; nombre[i] != '\0'; i++) | |
{ | |
if (i % 2 == 0) | |
{ | |
nombre[i] = toupper(nombre[i]); | |
} | |
else | |
{ | |
nombre[i] = tolower(nombre[i]); | |
} | |
} | |
printf("Después de intercalar: %s\n", nombre); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment