#include<iostream.h>
#include<conio.h>
void main()
{
int count=0;
char c;
clrscr();
cout<<"enter
the text and end with @\n";
cin.get(c);
while(c!='@')
{
cout.put(c);
count++;
cin.get(c);
}
cout<<"\n
Total no of character is = "<<count;
}
Output