subject
Computers and Technology, 24.11.2021 15:20 hellion

Q9) What will be the value of x and y after executing of the following segment? (Show your work) int x =3, p=8;
double y;

x = (int)(11 % x + x+p / x+p * 3.9 - x);

y = x / p * x;

System. out. println("x = " + x);
System. out. println("y = " + y);

Q10) Consider the following Program. Evaluate x and y. (Show your work) (5 m)
int y; double x;
x = 10 % 4 + 13 / 2 + 1.5;

y = 3 * 3 * 2 - 11 / 5;

System. out. println("x = " + x);
System. out. println("y = " + y);
System. out. println("x + y = " + x + y);
System. out. println("x + y = " + (x + y) );
System. out. println("x + y = " + ( (int)x + y) );
Q11) Show the value of x after the statement below is performed.
x = ( 3 * 9 * ( 3 + ( 9 * 3 / 3) )%7 ) ;

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
Robots with telescoping arms are sometimes used to perform tasks (e.g., welding or placing screws) where access may be difficult for other robotic types. during a test run, a robot arm is programmed to extend according to the relationship r = 3 + 0.5cos(4θ) and the arm rotates according to the relationship θ=−π4t2+πt , where r is in feet, θ is in radians, and t is in seconds. use a computer program to plot the path of tip a in x and y coordinates for 0 ≤ t ≤ 4s.
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
question
Computers and Technology, 23.06.2019 07:50
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
question
Computers and Technology, 24.06.2019 17:30
Looking at the electroscope, describe how you can cause the two leaves at the bottom to repel each other and stay that way
Answers: 3
You know the right answer?
Q9) What will be the value of x and y after executing of the following segment? (Show your work) i...
Questions
question
Mathematics, 06.05.2020 08:13
question
Spanish, 06.05.2020 08:13
question
Mathematics, 06.05.2020 08:13
question
English, 06.05.2020 08:13
Questions on the website: 13722363