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
oksano4ka [1.4K]
1 year ago
9

I need help with my solution

Computers and Technology
1 answer:
NemiM [27]1 year ago
6 0

Answer: B. a = 14 and b = 3

Explanation:

Let's work through the expressions one-by-one:

The first 2 lines create 2 varaibles, a<em> </em>and b, with values of 2 and 7, respectively.

The next line assigns a to the product of a and b.

a * b = 2 * 7 = 14, so the new value of a is 14.

The last line assigns the remainder of b divided by the difference of a and 10.

a - 10 is 14 - 10 which is 4.

The value of b is 7 due to the second expression. 7 % 4 is 3 as 4 goes into 7 once with 3 left over. This value of three is assigned to b.

After all the expressions, the values of the variables are as follows: a = 14 and b = 3.

You might be interested in
How can touch typing quickly but accurately improve your earnings (the money you can make)
AnnyKZ [126]

Doing so would not only increase your productivity potential / but also increase your productivity STANDARDS for certain jobs (e.g. data entry; secretarial work), which is a direct skill that is valuable to employers.  Furthermore, if you work in a a secretarial job, this would allow you to accomplish tasks such as "touch typing" a lot faster (without sacrificing quality) —  allowing you more time to accomplish other tasks, making you more efficient and even promotable in terms of pay raise and in terms of promotable to other positions with higher earnings — and even teach new staff members.

_____________________________


7 0
3 years ago
Read 2 more answers
Group of programs are software ​
Cloud [144]

Answer:

No

Explanation:

a single program or application is a software

3 0
2 years ago
Read 2 more answers
Write a telephone lookup program. Read a data set of 1,000 names and telephone numbers from a file that contains the numbers in
morpeh [17]

Answer:

See explaination

Explanation:

PhoneLookup.java

import java.io.FileReader;

import java.io.IOException;

import java.util.Scanner;

public class PhoneLookup

{

public static void main(String[] args) throws IOException

{

Scanner in = new Scanner(System.in);

System.out.println("Enter the name of the phonebook file: ");

String fileName = in.nextLine();

LookupTable table = new LookupTable();

FileReader reader = new FileReader(fileName);

table.read(new Scanner(reader));

boolean more = true;

while (more)

{

System.out.println("Lookup N)ame, P)hone number, Q)uit?");

String cmd = in.nextLine();

if (cmd.equalsIgnoreCase("Q"))

more = false;

else if (cmd.equalsIgnoreCase("N"))

{

System.out.println("Enter name:");

String n = in.nextLine();

System.out.println("Phone number: " + table.lookup(n));

}

else if (cmd.equalsIgnoreCase("P"))

{

System.out.println("Enter phone number:");

String n = in.nextLine();

System.out.println("Name: " + table.reverseLookup(n));

}

}

}

}

LookupTable.java

import java.util.ArrayList;

import java.util.Collections;

import java.util.Scanner;

/**

A table for lookups and reverse lookups

*/

public class LookupTable

{

private ArrayList<Item> people;

/**

Constructs a LookupTable object.

*/

public LookupTable()

{

people = new ArrayList<Item>();

}

/**

Reads key/value pairs.

atparam in the scanner for reading the input

*/

public void read(Scanner in)

{

while(in.hasNext()){

String name = in.nextLine();

String number = in.nextLine();

people.add(new Item(name, number));

}

}

/**

Looks up an item in the table.

atparam k the key to find

atreturn the value with the given key, or null if no

such item was found.

*/

public String lookup(String k)

{

String output = null;

for(Item item: people){

if(k.equals(item.getName())){

output = item.getNumber();

}

}

return output;

}

/**

Looks up an item in the table.

atparam v the value to find

atreturn the key with the given value, or null if no

such item was found.

*/

public String reverseLookup(String v)

{

String output = null;

for(Item item: people){

if(v.equals(item.getNumber())){

output = item.getName();

}

}

return output;

}

}

Item.java

public class Item {

private String name, number;

public Item(String aName, String aNumber){

name = aName;

number = aNumber;

}

public String getName(){

return name;

}

public String getNumber(){

return number;

}

}

input.txt

Abbott, Amy

408-924-1669

Abeyta, Ric

408-924-2185

Abrams, Arthur

408-924-6120

Abriam-Yago, Kathy

408-924-3159

Accardo, Dan

408-924-2236

Acevedo, Elvira

408-924-5200

Acevedo, Gloria

408-924-6556

Achtenhagen, Stephen

408-924-3522

Note: Replace all the "at" with at symbol

4 0
3 years ago
Are you concerned that strangers may have access to the personal information you share on social media platforms? Why or why not
GuDViN [60]
It makes me a little uneasy at times, yes, but I know that they cannot find me unless I share way too much.
Hope this helps~!
~{Oh Mrs. Believer}
4 0
3 years ago
What paper should I use for technical drawing?
Vitek1552 [10]

Answer:

classic A4 format, and therefore for 210 x 297 mm sheets

7 0
3 years ago
Other questions:
  • Which of the following is a disadvantage of using face-to-face communication over other communication channels? A) There is lag
    13·1 answer
  • What is one way to recognize whether an online source has been copyrighted? The source features the phrase “all rights reserved.
    6·2 answers
  • A circuit breaker will do which of the following
    12·1 answer
  • Cn someone help me plz
    11·1 answer
  • Example of Not a computer characteristics example
    12·1 answer
  • Represent the measuring unit ofcomputer un terms of fration of second​
    13·1 answer
  • 5. The command to add new layout to the slide is present in<br>tab.​
    15·1 answer
  • To delete unnecessary files on a hard disk use software
    5·2 answers
  • I ate five M&amp;Ms: red, green, green, red and yellow. Only these three colors are possible. I assume that p(yellow)=3p(green)
    9·1 answer
  • What is the difference between Brainly.com and Brainly.in? Ive been wondering because im not signed in under Brainly.in.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!