How can I enter more than one "int" statement? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can I enter more than one "int" statement?

Is it possible to have more than one int statement in a code and if so how do I name them?

19th Feb 2018, 10:20 PM
Bhekumusicayise
Bhekumusicayise - avatar
3 Answers
+ 1
you can have as many as you need you can also use one int for several variables
19th Feb 2018, 10:38 PM
Dominique Abou Samah
Dominique Abou Samah - avatar
+ 1
int a,b,c; a=1 b=2 c= 3 int a=1,b=2,c=3; int a,b,c = 0; <---declare and init all to 0 or any number you want but all will be the same.
19th Feb 2018, 10:49 PM
emmey
emmey - avatar
+ 1
Thanks Dominique and Emmey ☁️☃️
20th Feb 2018, 5:49 AM
Bhekumusicayise
Bhekumusicayise - avatar