Varianta 2 / Subiectul 2 / Problema 5 |
#include<iostream.h> #include<string.h> void main() { char s[40]; cin>>s; char v[]="aeiou"; for(int i=0;i<strlen(s);i++) if(strchr(v,s[i])!=0) //e vocala mica { char *aux; strcpy(aux,s+i); strcpy(s+i+1,aux); //dubleaza vocala mica s[i+1]=s[i+1]-32; //transforma dublura in mare } cout<<s; } |