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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:00, jroy1973
Awide variety of “ apps “ are available to customize devices. which category of app does the word processing software fall into?
Answers: 2
image
Computers and Technology, 23.06.2019 01:50, rhonda45801
Free points just awnser this. what should i watch on netflix
Answers: 2
image
Computers and Technology, 23.06.2019 05:20, jaylenmiller437
Which operating system is a version of linux?
Answers: 1
image
Computers and Technology, 23.06.2019 07:30, kimhoss2
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
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 in other subjects:

Konu
Mathematics, 21.08.2021 03:20