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
blondinia [14]
4 years ago
7

How can I do trace table java for LCM??

Computers and Technology
1 answer:
Dimas [21]4 years ago
5 0

Answer:

import java.util.*;

import java.io.*;

class Main {

   public static void main(String[] args) {

       int a,b,lcm1;

       System.out.println("Enter two integers: ");

       Scanner s12=new Scanner(System.in);

       a= s12.nextInt();

       b=s12.nextInt();

       // maximum number between n1 and n2 is stored in lcm

       lcm1 = (a > b) ? a : b;

       // Always true

       while(true)

       {

           if( lcm1 % a == 0 && lcm1 % b== 0 )

           {

               System.out.printf("The Least common multiple of %d & %d is %d.", a, b, lcm1);

               break;

           }

           ++lcm1;

       }

   }

}

Explanation:

You can find the LCM of two integers using the program in java written above in answer section.

You might be interested in
Create a string called alphabet containing 'abcdefghijklmnopqrstuvwxyz', then perform the following separate slice operations to
spin [16.1K]

Answer:

There is no short answer.

Explanation:

First let's create the string:

  • alphabetString = "abcdefghijklmnopqrstuvwxyz";

The first half of the string using slice method can be written as:

  • alphabetString.slice(0, 13);

The first half of the string using only the ending index can be written as:

  • alphabetString.slice(-13);

When we put - at the start of the index number, the counting begins at the last element with -1 and goes backwards.

The second half of the string can be written as:

  • alphabetString.slice(13,26);

The second half of the string using only the starting index can be written as:

  • alphabetString.slice(13);

To get the every second letter in the string, we need a for loop:

  • for( let x = 0; x < alphabetString.length(); x = x + 2){

                 alphabetString.slice(x);

}

To get the entire string in reverse, we can use the reverse method that is built-in:

  • alphabetString.reverse();

To get the every third letter of the string, we can again use a for loop:

  • for( let x = -1; x = -27; x = x - 3){

                  alphabetString.slice(x);

}

I hope this answer helps.

7 0
4 years ago
You are designing a wireless network for a client. Your client needs the network to support a data rate of at least 54Mbps. In a
mariarad [96]

Answer:

The best choice is 802.11a.

Explanation:

The most common option, that is widely used in home internet is 802.11b, however, this only supports a max speed of 11Mbps.

802.11a supports up to 54Mbps and it has regulated frequencies that prevent interference from other devices, such as the wireless system that your client already has. This option is more expensive, and its signal has issues going through walls and rooms but still, it is the one that fits him the most.

4 0
3 years ago
Who wanna do a rp pick ur own character but dont answer if you dont know what were doing i will put brainliest if someone gives
USPshnik [31]

my name is bug i have short hair and im 14

Explanation:

7 0
3 years ago
An online museum is creating a site hosting hundreds of thousands of digital representations of art from around the world. The w
Firdavs [7]

Answer:

A. the museum can choose a heuristic approach which will achieve a lossless compression, but they cannot be sure that it is the most efficient compression for each image

C. algorithms for lossless compression exist, so the museum can use those to compress the image

Explanation:

4 0
3 years ago
What kind of heat we feel from the sun
ivolga24 [154]

Is it solar heat? ultraviolet heat? UV?
6 0
4 years ago
Read 2 more answers
Other questions:
  • Which of the following is NOT a sedimentary structure?
    8·2 answers
  • What feature should an administrator use to meet these requirements?
    8·1 answer
  • What is basic statement made up of​
    10·2 answers
  • Is there a way to search your computer for all music files on it?
    9·1 answer
  • On an unweighted scale, a grade of A is worth _____ points
    7·1 answer
  • Hoda wants to create a new presentation in PowerPoint with existing graphics and designs. What is the easiest and fastest way fo
    14·1 answer
  • In dynamic programming, the technique of storing the previously calculated values is called A. Saving value property B. Storing
    7·1 answer
  • If you have 128 oranges all the same size, color, and weight except one orange is heavier than the rest. Write down a C++ Code/A
    7·1 answer
  • Help Me Please, Ill mark whoever has the best answer with brainliest.
    14·1 answer
  • 8.10.8 guess the passcode codehs
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!