is it casting or what | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

is it casting or what

double rst=0.0 rst = rst + (double) 1 / i;

30th Mar 2017, 2:07 PM
ALAMOUDI, WAEL MAKKI S
ALAMOUDI, WAEL MAKKI S - avatar
1 Réponse
+ 4
Yes, that converts the 1 into double before performing the computation.
30th Mar 2017, 3:02 PM
Álvaro