Gurzi Posted April 1, 2006 at 04:30 PM Report Share #20461 Posted April 1, 2006 at 04:30 PM Bem malta, vou deixar aqui algo básico mas que pode ajudar algumas pessoas 😛 Vou deixar funções que faço sozinho seguindo os problemas do Livro do Damas 🙂 Espero que possa ser útil futuramente 😛 Função updown(vai colocar a string introduzida assim " Eu GoStO dO pOrTuGaL a ProGrAmAr" ) char *updown(char *s) { int i=0; for (i=0;s[i]!='\0';i++) { if(i%2 == 0) s[i] = toupper(s[i]); else s[i] = tolower(s[i]); } return s; } -----------------------tem que utilizar a biblioteca ctype.h-------------------------- 😛 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now