source cords C++


#include <iostream>
using namespace std;

void main()
{
char response; // char is the data type and response is the name 

cout<<"Enter Response "; //cout is used to display words, outputs, etc. 
cout<<"\n";
cin>>response; //Enter data

cout<<"Response is " << response; // Display entered Data
cout<<"\n";
system ("pause");
}

//in char data type it only shows the first letter of any word. As an example if you inter response as Hay. It only shows H as output. 

No comments:

Post a Comment

lakshanenosh@gmail.com