#include<iostream>
#include<fstream>
#include<string>
using namespace std;
int main()
{
cout<<"Start entering your text\n Put a * to terminate\n";
ofstream fout;
fout.open("1818.txt");
int i=0;
char c;
while((c=getchar())!='*')
{
fout<<c;
}
fout.close();
ifstream fin;
fin.open("1818.txt");
int word=1;
int line=0;
int vowels=0;
while(fin)
{
fin.get(c);
if(c==' ')
word++;
else if(c=='\n')
line++;
else if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u')
vowels++;
}
fin.close();
cout<<"\nNo of lines"<<line;
cout<<"\nNo of words"<<word;
cout<<"\nNo of vowels"<<vowels;
system("pause");
}
i am getting the count wrong........pls anybody help me debugg it.......thanks in advance