How to assign a variable im getting confused | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to assign a variable im getting confused

help getting confused

18th Jun 2017, 12:30 PM
Aryan Shiv . R
Aryan Shiv . R - avatar
7 Answers
+ 1
The first step is to declare the variable: int x; Then you assign a value: x=15; This can be done with one expression: int x=15;
18th Jun 2017, 12:32 PM
Louis
Louis - avatar
18th Jun 2017, 12:36 PM
Elie Douaihy
Elie Douaihy - avatar
0
still dont have idea
18th Jun 2017, 12:38 PM
Aryan Shiv . R
Aryan Shiv . R - avatar
0
you need a variable, a variable must start by a letter example a ab a1... you need to choose type: integer without , example 1 float with virgule , example 1,5 you can declare it by 2 method: 1) int a=20; 2) int a; a=20; check my code up
18th Jun 2017, 12:44 PM
Elie Douaihy
Elie Douaihy - avatar
0
where
18th Jun 2017, 12:44 PM
Aryan Shiv . R
Aryan Shiv . R - avatar
18th Jun 2017, 12:46 PM
Elie Douaihy
Elie Douaihy - avatar
0
click on the link then run it
18th Jun 2017, 12:46 PM
Elie Douaihy
Elie Douaihy - avatar