jcortes96 / software2

Espacio para subir pruebas de software
0 stars 58 forks source link

pryecto_Miguel_pacheco_Eliana_Vargas_Elizabeth_Velasquez.cpp #25

Open miguelp2497 opened 5 years ago

miguelp2497 commented 5 years ago

//****INTEGRANTES**** //ELIZABETH VELASQUEZ MAHECHA //ELIANA VARGAS MONTENEGRO //MIGUEL ANGEL PACHECO ALFONSO //**

include

include

include "stdio.h"

include "string.h"

using namespace std;

int main() { int n; int vocal=0; char palabra[20]; char *p; p=new char[n]; p = palabra; cout<<"ingrese la palabra: "; cin>>palabra; n=strlen(p);

cout<<endl;
cout<<endl;
cout<<endl;

for(int c=0;c<=n;c++)
{
    cout<<*(p+c)<<endl;
}

for(int c=0;c<=n;c++)
{
    if(*(p+c)=='a')
    {
        vocal++;
    }
    else if(*(p+c)=='e')
    {
        vocal++;
    }
    else if(*(p+c)=='i')
    {
        vocal++;
    }
    else if(*(p+c)=='o')
    {
        vocal++;
    }
    else if(*(p+c)=='u')
    {
        vocal++;
    }
}

cout<<endl;
cout<<"numero de vocales: "<<vocal<<endl;

return 0;

}