To declare an Integer? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

To declare an Integer?

So to declare an Integer, I must do what?

30th Jun 2018, 8:43 PM
Candice Brown
Candice Brown - avatar
2 Answers
+ 2
Write int to identify the variable's datatype, then the name you wish to use to identify the variable. For example: int myVariable = 10; See Basic Concepts : Variables in the SoloLearn C++ course [https://www.sololearn.com/Play/CPlusPlus] for more information.
30th Jun 2018, 8:55 PM
ServantCoder
ServantCoder - avatar
0
int variable-name = value
1st Jul 2018, 3:13 PM
Aveek Bhattacharyya
Aveek Bhattacharyya - avatar