Varianta 7 / Subiectul 2 / Problema 5 |
#include<iostream.h> #include<string.h> void main() { char s[255]; cin.get(s,255); char v[]=" aeiou"; int gata=0,i; i=strlen(s)-1; while(!gata) //ca sa stearga o singura data { if(strchr(v,s[i])==0){ strcpy(s+i, s+i+1); gata=1; } i--; } cout<<s; } |