Task No. 3 about integer type conversions

  • 12
  • Locked
"Nothing organizes your thinking as much as performing integer type conversions in your head. Of course, a compiler will also suffice". And now, the third task in the "Integer Type Conversion" series. We have some variables converted to another type, but we don't have enough of them. We need to add one type cast operation to obtain the require answer.
You can't complete this task, because you're not signed in.
Comments (5)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Level 22 , Ba Sing Se, United States
13 July 2020, 22:45
int i = (byte) f;
int b = (byte) (i + f);
Level 16 , Dehra Dun, India
15 August 2020, 18:09
only changing the second line will also work
June Sung Park
Level 41 , Yangp'yong, Korea, Republic of
4 April 2020, 01:12
Try the smallest-sized data type so that the value may be lost.
Level 22 , Kolkata, india
23 May 2019, 05:34
i cant understand what should i do?
Level 41
23 May 2019, 06:34
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.