#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
	//tarife pointer
	char *c;
	int *i;
	//gereftane fazaye hafeze baraye pointer ha
	c = new char;
	i = new int;

	//pardazesh barname
	*i = 0;
	while ((*c = getch()) != 'p' && *c != 'P')
	{
		cout << *c;
		(*i)++;
	}
	cout << endl << endl << "Tedad horof type shode = " << *i;

	//azad sazi fazaye hafeze baraye pointer ha
	delete c;
	delete i;

	getch();
}

