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, 22.06.2019 15:20
This os integrated the processing power of windows nt with the easy-to-use gui of windows 98. windows 2000 windows 3.11 windows for workgroups windowa millennium edition
Answers: 1
question
Computers and Technology, 22.06.2019 17:40
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
question
Computers and Technology, 22.06.2019 19:50
Write a car class having two private member variables called tank and speed. write public methods called pumpgas and gofast. the method pumpgas gets an integer for gas that must be pumped. that value needs to be added to tank (no more than 20 gallons). it must return the amount of gas that is purchased ($4 per gallon). the method gofast should increase the speed by 5 each time it is called.write a constructor for the above class that initialized both variables to zero.write a tostring to display both the tank and speed when the car is printed.modify the car class to implement the interface comparable and an interface called carinter having the public methods in carinter.write the main program to create an array of size 5 of type car. create 5 car objects having each location of the array to refer to one of the cars. test the pumpgas, gofast, equals method on the array items. write an enhanced loop to print all the car values (using a tostring written last time).write a generic method to find the minimum of four items. pass int, double, char, string and car objects to test this method.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the 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
Questions on the website: 13722360