write a program in c++ to count number of words in c++ !! only right answer otherwise I'll report and not copied!⚠️⚠️
Answers
Answered by
2
_____________________________
# include<fstream.h>
#include<conio.h>
void main( )
{
clrscr( );
ifstream fin;
fin.open("out.txt");
char word[30];
int count = 0;
while ( ! fin.eof( ) )
{
fin>>word;
count++;
}
cout<<"Number of words in file is ";
cout<<count;
fin.close( );
getch( );
}
}____________________________
hope it helps ✌️✌️
Similar questions
English,
4 months ago
Math,
4 months ago
Math,
4 months ago
Computer Science,
9 months ago
Chemistry,
9 months ago