Mar 20, 2007

C++ program to input a character

This program will accept a character from the keyboard and display it along with hello.

#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
char z;
cout << "enter any character";
cin >> z;
cout << "hello :";
cout << z <<endl;
getch();
}

No comments:

Post a Comment

Infolinks In Text Ads

Total Pageviews

Powered by Blogger.

Dont Forget To Follow Us

Blog Archive