Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
- #include <stdlib.h>
- int main () {
- char vetor[100],aux;
- int n,i;
- printf("Digite a frase: ");
- gets(vetor);
- n = strlen(vetor);
- for(i=0;i<n;i++){
- aux = vetor[i];
- if (i%2 == 0){
- vetor[i] = (toupper(aux));}
- else {
- vetor[i] = (tolower(aux));}
- }
- printf("Frase nova: %s \n\n", vetor);
- return 0;
- }
Add Comment
Please, Sign In to add comment