1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
choli [55]
3 years ago
6

State what’s printed for each println in the code below:

Computers and Technology
1 answer:
allochka39001 [22]3 years ago
7 0

Answer:

Explanation:

Each of the following println statements will print the following values

ystem.out.println(floozy); // Problem 1:   97.4

System.out.println(theObj.gravy); //Problem 2:  107.43

System.out.println(xray[2]); //Problem 3:  100

System.out.println(s); //Problem 4: Hello

This is because out of all of the variables that the myMethod gives a value to, the only variable that is being saved back to the global variable in the main method is a[2]. The other variables are being saved as instance variables and not being returned. Therefore, when the println statements are called they target the local variables in the main method.

You might be interested in
Help pls<br> cmu cs 0<br> 4.1.2.1 Creating Groups checkpoint 1
Sindrei [870]

Answer:

Explanation:

Circle(centerX, centerY, radius, fill='black', border=None,

borderWidth=2, opacity=100, rotateAngle=0, dashes=False,

align='center', visible=True)

8 0
2 years ago
Read 2 more answers
Write a program that takes in an integer in the range 20-98 as input. The output is a countdown starting from the integer, and s
S_A_V [24]

Answer:

// program in C++.

#include <bits/stdc++.h>

using namespace std;

int main() {

//  variable  

int num;

cout<<"Enter the number between 20 and 98: ";

// read number

cin >> num;

while(num<20||num>98)

{

   cout<<"Wrong input!!enter number between 20-98 only:";

   cin>>num;

}

cout<<"The output is: ";

while(num % 10 != num /10)

{

// print numbers.  

cout<<num<<" ";

// update num.

num--;

}

// display the number.

cout<<num<<endl;;

return 0;

}

Explanation:

Read a number from user and assign it to variable "num".Check if entered number  is in between 20-98 or not.If input number is less than 20 or greater than 98 then  ask again to enter a number between 20-98 until user enter a valid input.Then print  the countdown from input number till both the digit of number are same.

Output:

Enter the number between 20 and 98: 99                                                                                    

Wrong input!!enter number between 20-98 only:12                                                                            

Wrong input!!enter number between 20-98 only:93                                                                            

The output is: 93 92 91 90 89 88

Enter the number between 20 and 98: 77                                                                                    

The output is: 77

7 0
3 years ago
I need help with Exercise 3.6.7: Sporting Goods Shop in CodeHS. ASAP
attashe74 [19]

Answer:

OK

Explanation:

7 0
3 years ago
How long before a speech should you begin practicing?
hichkok12 [17]

Answer:

D

Explanation:

4 0
3 years ago
Read 2 more answers
Matlab In this assignment you will write a function that will calculate parallel resistance for up to 10 parallel resistors. Cal
Ket [755]

Answer:

The complete Matlab code along with step by step explanation is provided below.

Matlab Code:

function Req=ParallelR(Number)

Number=input('Please enter the number of resistors: ');

if Number>10 | Number<=0

   disp('Invalid input')

return

end

R=0;

for i=1:Number

r=input('Please enter the value of resistor: ');

R=R+1/r;

end

Req=1/R;

end

Explanation:

Parallel resistance is given by

\frac{1}{Req} = \frac{1}{R_{1}} + \frac{1}{R_{2}} + \frac{1}{R_{3}}...+\frac{1}{R_{N}}

First we get the input from the user for how many parallel resistors he want to calculate the resistance.

Then we check whether the user has entered correct number of resistors or not that is from 1 to 10 inclusive.

Then we run a for loop to get the resistance values of individual resistors.

Then we calculated the parallel resistance and keep on adding the resistance for N number of resistors.

Output:

Test 1:

Please enter the number of resistors: 3

Please enter the value of resistor: 10

Please enter the value of resistor: 20

Please enter the value of resistor: 30

ans =       60/11

Test 2:

Please enter the number of resistors: 11

Invalid input

Test 3:

Please enter the number of resistors: 0

Invalid input

8 0
2 years ago
Other questions:
  • You work in a customer call center. Martin is on the phone asking about the difference between solid-state drives (SSDs), hybrid
    6·1 answer
  • Variables set equal to patterns are said to be:_______.
    7·1 answer
  • _________ is the start up sequence a computer conducts.
    9·1 answer
  • Information is best described as
    10·1 answer
  • The Advanced Properties sheet enables you to add which of the following?
    15·1 answer
  • Match the hardware device with the "category" into which it falls. Remember to choose
    8·1 answer
  • Write a C function named apply_all that expects two arrays of integers and their sizes and dynamically allocates a new array of
    7·1 answer
  • The __________ algorithm takes the ciphertext and the secret key and produces the original plaintext
    11·1 answer
  • What is Cloud computing? Explain briefly
    15·2 answers
  • To make the monster pace, you needed the monster to turn ___ degrees.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!