I have some couple of minor problems, I just don't know how to solve them.
(Objectif 1: Use a RES variable in math equation )
On first image of Arduino, I can't figure out how to put ",2" character to get two decimals on Serial monitor.
(Objectif 2: Test measurement on D2 using boolean)
On second image, I can't understand an error in my void setup
First, posting pictures of your code is nowhere near as good as posting your real code. We can't cut and paste mistakes from your pictures.
Also, once we go to reply mode, the pictures go away.
I can't figure out how to put ",2" character to get two decimals on Serial monitor.
It goes INSIDE the parentheses. It's an optional argument. It's also the default. Of course, it only applies to printing floats or doubles (which are really floats, too). Printing an int to two decimal places makes no sense.
On second image, I can't understand an error in my void setup
Your code is full of errors. Some time spent with the reference page would be much more beneficial than my pointing them all out.
The ',2' arguments you're trying to pass to Serial.print need to be inside the brackets, as PaulS pointed out.
In your case the numbers you're printing are integers (whole numbers) so for example 5/2 is equal to 2.5 but when you use integer arithmetic the '.5' is lost and the answer is 2. If you're printing integers then the second argument isn't required anyway.
In your print statements you are printing values like this:
Serial.print(RES = RES/2);
That has two effects: it prints the value of RES/2, and it also assigned that value back to RES so RES is no longer equal to five - this would affect the results of all the subsequent calculations. If you only want to print the value of RES/2 without changing the value of RES in the process, then you can do it like this: