+ 2
Whats the difference between assigning a value to a variable and inputing a value through cin
4 Réponses
+ 7
When you read user input via cin, this value still needs to be stored in a variable. When you generally assign a value to a variable it is done within the code by assigning a constant, the value of another variable, or the result of a calculation to the variable without taking any user input. However, assigning user input via cin into a variable could also be considered a special case of variable assignment.
+ 2
That you cin takes user input (and assignes a value), but assigning a value can the computer do without any interaction
+ 2
Airree, thank you so so much but your answer is kind of not linking. I am trying to grab what u said.