Q3)
If the total value is greater than or equal to 100, and count value is 10, then we are adding value to total.
Equivalent code can be written in C or Java like below:
--------
if(total>=100 && count == 10)
total += value;
-----------
Note : In order to excute body of the if loop both conditions must be true, because we are using '&&' here.
----------------------------------------------
Q4)
If the value is less than or equal to 50 or the value greater than or equal to 100, then we are making/set the value as 0.
Equivalent Java)C code:
---------
if( value<=50 || value>=100)
value = 0;
-------
Here operator || is used for checking for condition checking , if any of the one condition satisfies , then if loop executes. The values that satifies the above conditions are numbers below 50 and numbers above 100.
Q3. if (total > 100) and (count - 10) then add value to total endir Q5....
Q7. While (sum <100) or (flag - 1) add 5 to sum endWhile 911. for count = 20 down to 1 add 1 to value endFor;
language: C++
creat a program that:
Q5 10 Pts) output the numbers below using the one that occurs must frequently first Most Frequently({3,4,1,1,1},5) => 1113 4 void MostFrequently(const int* nums, int size) { } I Q5 10 Pts) output the numbers below using the one that occurs must frequently first MostFrequently({3,4,1,1,1},5) => 11134 void Most Frequently(const int* nums, int size) -- } 1
Questions Q1 (0/T0) Q2 (0/10) Q3 (0/10) Q4 (0/10) Q5 (0/10) Q6 (0/10) A mass weighting 8 lbs stretches a spring 9 inches. The mass the mass has a velocity of 6 ft/sec. is in a medium that exerts a viscous resistance of A lbs when This system will be overdamped if A> Preview lbs Get help: Video Grade: 0/60 License Points possible: 10 This is attempt 1 of 2. Message instructor about this question Print Version AAA A
Questions...
Evaluate the following integral. 10-100 -, x> 10 Nx? - 100 dx S = 1x2-100 Enter your answer in the answer box javascript:doExercise (5);
check) Determine the value in total after each of the following loops is executed for (i=i; i <-10; i-i+1) 3. (Desk a. total o total- total + 1i b. total 1; for (count 1; count <- 10, count count + 1) total = total * 2; c. total-0 for (i10; i 15: i i+ 1) total total ii d. total = 50; for (i -1: i <10; i i + 1) total = total - i; e. totall; for (icnt...
Q5 3 Points What is the maximum value of 22/(23 – 15) for |z< 2? O 2/15 0 1/4 04/7 O 47
Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 0 P(1.12-Z 2.34)-? 0 P(-1.12<Z 0.34)? 0 P(-2.123Z<-1.34)-? 0 P(Z-2.34)-? 0 P(-4.12<Z<5.34)-? 0 P(2.12-Z)? 0 P(Z 0.34)-? 0 P(-1.12<Z)? 0 P(-4.12<Z<0)-? 0 P(Z-2.34)-? n if P(Z*A)- 0.934 then Q11 what is A?
#include<stdio.h> sint main() { int k, j, count = 0; for (k = -1; k <= 5; k++) { 1; j--) for (j 4; j >= count++; } printf("count=%d", count); getchar(); return 0; بها count =28 count -21 couunt =28 count =15
Q3. Find the largest value of t > 0 such that on your computer system (a) e'>0 (b) e' is a finite number The Matlab function exp gives the exponential function. Q4. Using integration by parts the integral J, = ſx"et-'dx can be evaluated as (1) Jo = e ', J, =1 – n.J =1 (1) Using Equation (1) calculate Jn for n=1, 2,...10 (a) with the approximate value e'= 0.367879. (b) with the value él = exp(-1) provided by...
Q3) (20 Mark) A student's test score T is an integer between 0 and 100 corresponding to the experimental outcomes s0; s1,., s100. A score of 90 to 100 is an A, 80 to 89 is a B, 70 to 79 is a C, 60 to 69 is a D, and below 60 is a failing grade of F. If all scores between 51 and 100 are equally likely and a score of 50 or less never occurs, find the...