Double checking work... The variable a starts with the value 1. The variable b starts with the value 10. The variable c starts with the value 100. The variable x starts with the value 0. Store the value of c times 3 in x. Add the value of b times 6 to the value already in x. Add the value of a times 5 to the value already in x. Display the value in x on the screen.
Answer is 365? a=1 b=10 c=100 x=0 100(3)=300(x) 10(6)=60, 300+60=360(x) 1(5)=5, 5+360=365 display 365
a=1 b=10 c=100 x=0 x = c * 3; //100 * 3 = 300 x = x + (b * 6); // 300 + (6 * 10) = 360 x = x +(a * 5); // 360 + (1 * 5); = 365.
yes indeed 365. a = 1 b = 10 c = 100 x = 0 x = 100 * 3 = 300 x = 300 + 10 * 6 = 360 x = 360 + 1 * 5 = 365 Display x (365)
Join our real-time social learning platform and learn together with your friends!