What is wrong? 1) int x = 5/2.0; 2) byte b = 50; b = 2*b; 3) int x = 10; float f = 2.0*x; | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

What is wrong? 1) int x = 5/2.0; 2) byte b = 50; b = 2*b; 3) int x = 10; float f = 2.0*x;

what is wrong in these statements

16th Feb 2021, 5:14 PM
Alrabab Saeed
Alrabab Saeed - avatar
1 Réponse
+ 1
You can't 5/2 because it should be an integer type
16th Feb 2021, 11:54 PM
Essisten
Essisten - avatar