Programa la frase
- 1. //PROGRAMA LA FRASE<br />//AUTOR LUIS DAQUILEMA 6to informática<br />#include <iostream.h><br />#include <conio.h><br />#include <string.h><br />int main ()<br />{<br />int ma=0,me=0,mi=0,mo=0,mu=0,s=0,t,ar;<br />char frase[40];<br />{<br />clrscr();<br />cout<<quot;
ingrese la frase:quot;
<<endl;<br />cin.getline(frase,40);<br />t=strlen(frase);<br />cout<<quot;
la frase tiene:quot;
<<t<<endl;<br />for(int c=0;c<39;c++)<br />{<br />if (frase[c]=='a')<br />ma++;<br />else<br />if (frase[c]=='e')<br />me++;<br />else<br />if (frase[c]=='i')<br />mi++;<br />else<br />if (frase[c]=='o')<br />mo++;<br />else<br />if (frase[c]=='u')<br />mu++;<br />else<br />if (frase[c]==' ')<br />s++;<br /> }<br /> cout<<quot;
el total A: quot;
<<ma<<endl;<br /> cout<<quot;
el total E: quot;
<<me<<endl;<br /> cout<<quot;
el total I: quot;
<<mi<<endl;<br /> cout<<quot;
el total O: quot;
<<mo<<endl;<br /> cout<<quot;
el total U: quot;
<<mu<<endl;<br /> cout<<quot;
el total de espacios en blanco: quot;
<<s<<endl;<br /> }<br /> getch();//findel programa<br />}<br />