Programming with Passion

Make the best out of everything.

Tuesday, 22 March 2016

Accepting Data into a variable

Accepting Data into a variable


The keyword 'cin' is used to accept the data.


Program 2
#include

Main()
{
int num;

cout<<"enter a number";

cin>>num;

cout<<"Number"<
}

The name of a variable should not enclose inside the quotes.

No comments:

Post a Comment