subject

Q6) Trace the following programs and show what will be the output? (Show your work) int m=7, n=5;

System. out. println(" m = " + n +" n = "+ m);

m=m+5;

n=n*3;

System. out. println(" m = " + m + 2 + " n = "+ n);

m=m%n;

n=n%m;

System. out. println(" m = " + (m + 2) +" n = "+ n);

Q7) Trace the following programs and show what will be the output? (Show your work)

int m=5, n=7;

System. out. println(" m = " + m +" n = "+ n);

m = n;

n = m;

System. out. println(" m = " + m+" n = "+ n);

Q8) What is the output of the following program? Show your work.
int num1;
double num2;
num1 = 10/3;
num2 = 10/3;

System. out. println(" num1 = " + num1);
System. out. println(" num2 = " + num2);

num1 = (int)(10.0/3);
num2 = 10/3.0;

System. out. println(" num1 = " + num1);
System. out. println(" num2 = " + num2);

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
Which function key is used to enable the spelling & grammar function in a word processing program such as microsoft word?
Answers: 3
question
Computers and Technology, 22.06.2019 04:30
Ryan is working on the layout of her web page. she needs to figure out where her header, navigation bar, text, and images should go. what technique can her?
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
What social factors affect your health
Answers: 3
question
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
You know the right answer?
Q6) Trace the following programs and show what will be the output? (Show your work) int m=7, n=5;...
Questions
question
Mathematics, 22.07.2019 13:30
Questions on the website: 13722362