C++ Program to print character

In C++, to get input by user, we use cin>> and to print something we use cout<<.
#include<iostream>
using namespace std;
int main()
{
 char ch;
 cout<<"Enter a character: ";
 cin>>ch;
 cout<<"Character is : "<<ch;
 return 0;
}


Popular posts from this blog