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
Vlad1618 [11]
3 years ago
15

Write a program that will accept input of two positive decimal integer values and output the prime factorizations of the input v

alues. A sample run is below. User input is in boldface.
Computers and Technology
1 answer:
Tanzania [10]3 years ago
7 0

Answer:

C code given below

Explanation:

#include <stdio.h>

void factorize(int num){

  int i = 2;

  printf("The prime factorization of %d is ", num);

  while(num != 0){

      if(num % i == 0){

          printf("%d", i);

          num /= i;

          if(num != 1){

              printf("*");

          }

          else{

              printf(".\n");

              break;

          }

      }

      else{

          ++i;

      }

  }

}

int main(){

  int num;

  printf("Give them to me one by one and I will do the factoring. \n");

  printf("Number? ");

  scanf("%d", &num);

  factorize(num);

  printf("Number? ");

  scanf("%d", &num);

  factorize(num);

  return 0;

}

You might be interested in
What is the full form of RPM in computer ​
alex41 [277]

Full from of RPM in computer is Revolutions Per Minute.

4 0
3 years ago
Read 2 more answers
Determine the number of cache sets (S), tag bits (t), set index bits (s), and block offset bits (b) for a 40964096-byte cache us
pogonyaev

Complete Question:

Determine the number of cache sets (S), tag bits (t), set  index bits (s), and block offset bits (b) for a 4096-byte cache using 32-bit memory addresses, 8-byte cache blocks and a 8-way associative design. The cache has :

Cache size = 1024 bytes, sets t = 26.8, tag bits, s = 3.2, set index bit =2

Answer:

Check below for explanations

Explanation:

Cache size = 4096 bytes = 2¹² bytes

Memory address bit = 32

Block size = 8 bytes = 2³ bytes

Cache line = (cache size)/(Block size)

Cache line = \frac{2^{12} }{2^{3} }

Cache line = 2⁹

Block offset = 3 (From 2³)

Tag = (Memory address bit - block offset - Cache line bit)

Tag = (32 - 3 - 9)

Tag = 20

Total number of sets = 2⁹ = 512

3 0
3 years ago
Which directory in the FHS stores programs and configuration information that can only be executed and modified by the root user
dlinn [17]

Answer: /sbin

Explanation:

In Linux, FHS describes the directory content and the way in which Operating System files are displayed to the user.

/sbin is a directory that contains executable programs. s/bin is the short form of system binaries. System binaries require root rights to perform specific tasks. /sbin contains binaries that are crucial to boot the system and also to recover and restore the system. /bin directory also contains the commands to boot the system but the main difference between both is that /sbin programs can only be executed by the root user. Examples are fdisk, fsck, root,halt, init, grub, ifconfig.

4 0
3 years ago
Which type of operating system is usually used in personal computers?
castortr0y [4]
Windows 10 thru 7 home and some people use mac osx
7 0
3 years ago
Read 2 more answers
HELP LOTS OF POINTS
andrew11 [14]

My guess would be B and D.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Consider the following scenario: "You are an assistant to the accounting manager for a small company that sells sports equipment
    5·1 answer
  • On an open book test, Anna was asked to predict how American laws may affect the Mexican way of life if the US Constitution was
    15·1 answer
  • An is auditor reviewing a network log discovers that an employee ran elevated commands on his/her pc by invoking the task schedu
    10·1 answer
  • A student opens a recently purchased software package and begins reading the enclosed materials. What information might be inclu
    6·1 answer
  • True or false when a host gets an IP address from a DHCP server it is said to be configured manually
    15·1 answer
  • Write the definition of a function reverse, whose first parameter is an array of integers and whose second parameter is the numb
    15·1 answer
  • Why hackers hack?? in other people?​
    8·2 answers
  • Jackie is planning a surprise birthday party for her best friend and is researching a location to have the party. Jackie found a
    6·1 answer
  • What is software engineering? What are the objectives of software engineering?
    5·1 answer
  • the first thing to do when your computer gives you an error message is A restart the computer B press the F2 key C write down th
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!