0
can some one elaborate the use of 'cin'. How we can use it in a more practical way?
3 Réponses
0
the cin command is used as to read input and no format specifiers needed for this.
0
The cin command is used for user in put for example
main()
{
int a;
int b=10;
cout << "yonatan please write any number below 10 in order to subtract your number from 10";
//cin allows you to enter a number cin >> a;
int sum = b - a;
cout << "sum";
/* without cin there is no user input,you can not enter a number*/
return 0;
}
0
You can use cin in order for the user to input
and well the command cin reads the user input