Monday 21 May 2012

Lecture: 74


                                                Lecture 74

#include <iostream>
#include <conio.h>
using namespace std;
 main ()
{  
   char ch;
   int count=0; 
   cout<<"Type ina phrase : \n";
   for(;(ch=getch()) != '\r';)
   {
       cout<<ch;
       count++;
   }   
    cout<<" \n\nCharacter count is : "<<count;
  getch();
  return 0;
}
Code view in dev compiler:

Compile the program Ctrl+F9

      Run program Ctrl+F10