Monday, November 26, 2012

C++ PROGRAM TO MAKE THE FREQUENCY COUNT OF LETTERS INA GIVEN TEXT.

/* A C++ PROGRAM TO MAKE THE FREQUENCY COUNT OF LETTERS INA GIVEN TEXT. */
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
    int lc;
    char s[30];
    clrscr();
    ios::skipw();
    int i=0;
    cout<<"Enter the text ending with #:";
    do
    {
        cin.get(s[i]);
    }while(s[i++]!='#');
    cout<i;
    getch();
}

No comments:

Post a Comment