package com.codegym.task.task10.task1007;
/*
Task No. 7 about integer type conversions
*/
public class Solution {
public static void main(String[] args) {
long l = 1234_564_890L;
int x = 0b1000_1100_1010;
double m = (byte) 110_987_654_6299.123_34;
//System.out.println(m) --> -1 ?!?!?!?!?!?!??!?!?;
float f = l++ + 10 + ++x - (float) m;
l = (long) f / 1000;
System.out.println(l);
}
}
Don't know how get result of variable m (-1) :/
Under discussion
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Fadi Alsaidi
18 December 2019, 01:53
Just because I think this is a brain teaser more than an actual useful exercise here is the solution
/**Posting a solution is prohibited*/
0
Guadalupe Gagnon
15 November 2019, 14:51
have you solved?
0