+ 1
Please help. I donât understand question 3 of primitive operators.
8 Answers
+ 15
qestion 3 of what?
+ 1
have you checked the forum on the question? and you have to specify the lesson and language or we dont know
+ 1
It's simple...
Just keep in mind this points :
⢠If you use "int" then it shows only whole numbers
For example - 9, 23, 1 and so on.
⢠If you use "double " or "float " then it shows decimals also.
For example - 6.23, 5.2, 0.3 and so on.
⢠If "/" is used, then the answer is the quotient of that question.
⢠Whereas if "%" is used, then the answer is the remainder of that question.
Now to show you, here's an example -
Using "/" and "int"
int x = 23;
int y = 5;
int result = x/y;
System. out. println(result);
Hence the answer is 4
Using "/" and "double"
double x = 23;
double y = 5;
double result = x/y;
System. out. println(result);
Hence the answer is 4.6
Using "%" and "int"
int x = 23;
int y = 5;
int result = x%y;
System. out. println(result);
Hence the answer is 3
Using "%" and "double"
double x = 23;
double y = 5;
double result = x%y;
System. out. println(result);
Hence the answer is 3.0
đ
sorry it's quite big.
0
i dont know wich lesson
0
question 3 of primitive operators
0
which language?
0
I see..
its basic division.
15/4 is 3.. technically it is 3.xxx but they are asking for an int which is a number that doesn't contain a decimal.
0
there are some floats..or double float sort of thing...in that the answer had to full integer that why its 3 Because that an below 4..