Programing
Programing
int lastdigit=0;
int vowels = 0;
for(int i=0;name[i]!='\0';i++)
{
if(name[i] =='a' || name[i] =='e' || name[i] =='i' ||
name[i] =='o' || name[i] =='u' || name[i] =='A' ||
name[i] =='E' || name[i] =='I' || name[i] =='O' ||
name['U'] )
{
vowels++;
cout<<"Vowels No"<<vowels<<":"<<name[i]<<endl;
}
}
int total = vowels + lastdigit;
cout<<"\nTotal Vowels in my first name :"<<vowels<<endl;
cout<<"Sum of vowels in my name and VUID is :"<<total<<endl;
if(total %2==0)
for(int i=1;i<=total;i++)
{
cout<<"\nIteration no :"<<i<<endl;
cout<<"My first name is "<<name<<endl;
}
else
{
for(int i=1;i<=total;i++)
cout<<"\nIteration no :"<<i<<endl;
cout<<"My last name is "<<lastname<<endl;
}
return 0;
}