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
BartSMP [9]
3 years ago
10

Answer to get brainiest. I NEED HELP PLEASE!! I am supposed to type a program on base conversion. Starts from base of 10 (decima

l) converted to any base. Must use while loops, if loops, but no for loops.

Computers and Technology
1 answer:
Virty [35]3 years ago
6 0

Here's a solution that works except for the leading zeros. Unclear (to me) why they need to be there and what's the logic?


  public static void main(String[] args)  

  {    

       int number, base;

       Scanner Cin = new Scanner(System.in);  

       System.out.print("Enter a decimal number between 1 and 100,000: ");

       number = Cin.nextInt();

       System.out.print("Enter a base from 2-16: ");

       base = Cin.nextInt();          

       System.out.format("The number %d in base %d is %s.", number, base, Integer.toString(number, base).toUpperCase());

  }

You might be interested in
If you have created a document that contains a table that is 10 inches wide and 4 inches high, you will want to print the docume
Papessa [141]
True you will want to print the document in Landscape orientation
6 0
3 years ago
Read 2 more answers
Considering the following algorithm, which of the following requirements are satisfied?
Alisiya [41]

Answer:

b) Bounded Waiting

Explanation:

int currentThread = 1;

bool thread1Access = true;

bool thread2Access = true;

thread1 { thread2 {

While (true) {

                   While (true)

                                   {

                     while(thread2Access == true)

                                       {

                                      while(thread1Access == true)

                                       {

                                            If (currentThread == 2) {

                                              If (currentThread == 1)

                                                {        

                                                  thread1Access = false; thread2Access = false;

                                                  While (currentThread == 2);

                                                 While (currentThread == 1);

                                                  thread1Access = true; thread2Access = true;

} }

/* start of critical section */ /* start of critical section */

currentThread = 2 currentThread = 1

… ...

/* end of critical section */ /* end of critical section */

thread1Access = false; thread2Access = false;

… ...

} }

} }

} }

It can be seen that in all the instances, both threads are programmed to share same resource at the same time, and hence this is the bounded waiting. For Mutual exclusion, two threads cannot share one resource at one time. They must share simultaneously. Also there should be no deadlock. For Progress each thread should have exclusive access to all the resources. Thus its definitely the not the Progress. And hence its Bounded waiting.

4 0
3 years ago
What type of cable is used to connect a workstation serial port to a cisco router console port?
butalik [34]

a <span>Ethernet-<span>Cable is a how to put it together</span></span>

<span><span /></span>

6 0
3 years ago
which type of encoding involves relating new information to existing knowledge that you already have stored in long-term memory?
rjkz [21]

A type of encoding that involves relating new information to existing knowledge that you already have stored in long-term memory is: Semantic encoding.

Encoding can be defined as a communication process in which the sender of a message transforms an information into an encrypted message, in the form of notable symbols that represent ideas or concepts.

Generally, a message that has been encoded by a sender requires a decoding action by the recipient, in order for the communication process to be complete.

Semantic encoding is a type of encoding which typically involves the relation of new information with respect to an existing knowledge that has been stored in long-term memory.

In conclusion, semantic encoding deals with the encoding of meaning from new information rather than perceptual characteristics such as the meaning of words in English language.

Read more: brainly.com/question/24113575

7 0
2 years ago
What is a generic phone
Zina [86]

Explanation:

Generic Android Device means the Android devices which does not any specific brand name or they can not be related to any specific class or brand. For ex: Samsung developed Epic 4g Touch Android device but they later removed lot of fancy features and stuffs from it launched with Galaxy S.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Why isn't my rank move from ambitious to virsto i met all the requirements
    8·2 answers
  • The______for our newest game keeps changing as we develop our concept and refine our goals.
    11·2 answers
  • Pseudocode for mystry algorithm
    5·1 answer
  • Which is a solution that represents the majority of VPNs on the market and is commonly referred to as a VPN appliance?
    13·1 answer
  • Space cushion includes
    8·2 answers
  • What is a conditional Statement that causes the program to change its course​
    11·1 answer
  • Define client and.server​
    13·1 answer
  • Typically, hybrid drives use SSD to store the operating system and applications and hard disks to store videos, music, and docum
    5·1 answer
  • If I want to make it look like slide number one is turning a page to slide number two, what
    11·1 answer
  • You have instructed all administrators to disable all nonessential ports on servers at their sites. why are nonessential protoco
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!