1. Given the following code... var speed = 30; var density = 50; var flow - 0; for(var i = 2; i <= 4; i++) { if( speed >

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

1. Given the following code... var speed = 30; var density = 50; var flow - 0; for(var i = 2; i <= 4; i++) { if( speed >

Post by answerhappygod »

1 Given The Following Code Var Speed 30 Var Density 50 Var Flow 0 For Var I 2 I 4 I If Speed 1
1 Given The Following Code Var Speed 30 Var Density 50 Var Flow 0 For Var I 2 I 4 I If Speed 1 (28.08 KiB) Viewed 27 times
1 Given The Following Code Var Speed 30 Var Density 50 Var Flow 0 For Var I 2 I 4 I If Speed 2
1 Given The Following Code Var Speed 30 Var Density 50 Var Flow 0 For Var I 2 I 4 I If Speed 2 (25.47 KiB) Viewed 27 times
1. Given the following code... var speed = 30; var density = 50; var flow - 0; for(var i = 2; i <= 4; i++) { if( speed >= 11 ) { > density += 10; } else if( density < 51 || 1 == 3 ) { density += 1; } else { density = flow + speed; } speed- flow++; } a) What is the final value that is assigned to the 'speed' variable? b) What is the final value that is assigned to the 'density' variable? c) What is the final value that is assigned to the 'flow' variable? d) What is the final value that is assigned to the counter variable 'i'?

2. . var num1 = 40; var num2 = 90; var num3 = 20; var num4 = 130; var sum; for(var i = 1; i <= 2; i++) { if( num3 > num1 && num2 < num4 ) { num4 = num3; num1 = num1 + num4; sum = num1 - num2; } else if num4 < num1 || num2 != num3 ) { num1 = num4; num2 = num2 + num3; sum = num4 + num2; } else { num3 = num2; num4 = num3 - num4; sum = num4 + num1; } } What is the final value assigned to the sum variable?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply