/*******************************************
Name: Counting characters
Copyright: BCS-1A
Author: Muhammad Hussnain Imtiaz
Date: 26/12/11 23:11
Description:
********************************************/
//preprocesser directive
#include<iostream>
#include<conio.h>
using namespace std ;
int main ()
{
//local declaration
int counter =0;
cout << " Enter # at the end of your paragraph\n Don't press 'Enter'\n\n" ;
while ( getche() != '#' )
{
counter++ ;
}
cout << "\n\n You press " << counter << " times" ;
cout << "\n Press any key" ;
getch () ;
system ("CLS");
cout << "\n\n\n\n\n\n\n\n\n Created By:Mohammad Hussnain Imtiaz" ;
getch ();
return 0;
}// end of main function
No comments:
Post a Comment