Entonces se me ocurre que tengas problemas de voltajes, pero no a la alza sino a la baja, que no reciban suficiente voltaje
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCita de: rir3760 en 3 Enero 2014, 17:55 PM
En el caso del programa de SoyelRobert las sentencias "break;" en la función "sigVocal" son necesarias para tener el efecto deseado, si se eliminaran la función siempre retornaría 'a' como la siguiente vocal.
Un saludo
#include <stdio.h>
void sigVocal ();
char c;
int main (){
c=getchar();
do{
sigVocal();
printf("%c", c);
c=getchar();
}// fin dentro del do
while(c!= '.');
printf("\n");
}//fin main
void sigVocal (){
if(c=='a'){c='e';}
else if(c=='e'){c='i';}
else if(c=='i'){c='o';}
else if(c=='o'){c='u';}
else if(c=='u'){c='a';}
else {c=c;}
}//fin sigVocal
Código:
#include <stdio.h>
int esVocal (char c);
char sigVocal (char c);
int main ()
{
char c;
do{
if(esVocal(c)){
sigVocal(c);
}//fin if
printf("%c", c);
}// fin dentro del do
while(scanf("%c", &c)!= EOF);
return 0;
}//fin main
int esVocal (char c){
if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u') return;
}// fin esVocal
char sigVocal (char c){
if(c=='a')c='e';
if(c=='e')c='i';
if(c=='i')c='o';
if(c=='o')c='u';
if(c=='u')c='a';
return c;
}//fin sigVocal
#include <stdio.h>
int esVocal (char c);
char sigVocal (char c);
int main ()
{
char c;
do{
if(esVocal(c)){
sigVocal(c);
}
printf("%c", c);
return 0;
}
while(scanf("%c", &c)!= EOF);
int esVocal (char c){
if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u') return;
}
char sigVocal (char c){
if(c=='a')c='e';
if(c=='e')c='i';
if(c=='i')c='o';
if(c=='o')c='u';
if(c=='u')c='a';
return c;
}