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

Create a program that prints out a list of all the divisors of a number stored in a variable. (If you don’t know what a divisor

is, it is a number that divides evenly into another number. For example, 13 is a divisor of 26 because 26 / 13 has no remainder. If the desired number is 26, your program should print 1, 2, 13, and 26.)
Computers and Technology
1 answer:
UkoKoshka [18]3 years ago
7 0

Answer:

// Program is written in C++ Programming Language

// Comments are used for explanatory purpose

// Program starts here

#include<iostream>

using namespace std;

int main()

{

// Declare integer variable n which serves as the quotient.

int n;

// Prompt to enter any number

cout<<"Enter any integer number: ";

cin>>n;

// Check for divisors using the iteration below

for(int I = 1; I<= n; I++)

{

// Check if current digit is a valid divisor

if(n%I == 0)

{

// Print all divisors

cout<<I<<" ";

}

}

return 0;

}

You might be interested in
Which service works in conjunction with EC2 Autoscaling in order to provide predictive scaling based on daily and weekly trends
Lunna [17]

The service that works in conjunction with EC2 Autoscaling in order to provide predictive scaling based on daily and weekly trends is target tracking.

<h3>How can I employ Predictive Scaling with target tracking? </h3>

Predictive Scaling works is known to be one that works in line with target tracking. They both help to make one's EC2 capacity to change more better to one's incoming application traffic.

Note that target tracking scaling policies is one where a user has to select a scaling metric and set a target value.

Learn more about Autoscaling  from

brainly.com/question/17661222

4 0
3 years ago
I have some IT problem. Can I find a programmer here?
Jlenok [28]
If it's a hardware problem, find a mechanic or buy replacement parts.
If it's a software issue, someone ranked high on Brainky may know the programming language.
A handy hint is just to ask! If your question isn't answered, try elsewhere!
3 0
3 years ago
Carmen wanted to clear up space on her computer and remove unwanted files. What would be the best for her to delete?
melisa1 [442]

Answer:

junk files

Explanation: if a file is in a junk file it is most likely unwanted

7 0
3 years ago
Read 2 more answers
Write the following generic method that sorts an ArrayList of Comparable items. The sort method must use the compareTo method.
Inessa05 [86]

Answer:

Explanation:

The following code is written in Java, it prompts the user to enter 10 integers and saves them to an ArrayList. Then it prompts for 5 strings and saves them to another ArrayList. Then, it calls the sort method and adds the lists as parameters. Finally, it prints out both lists completely sorted in ascending order.

import java.util.ArrayList;

import java.util.Scanner;

class Division{

   public static double division(double a, double b) throws Exception {

       if(b == 0)

           //throw new Exception("Invalid number.");

           return (a / b);

       return a / b;

   }

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       ArrayList<Integer> mylist2 = new ArrayList<>();

       for (int x = 0; x < 10; x++) {

           System.out.println("Please Enter a Number: ");

           int number = in.nextInt();

           mylist2.add(number);

       }

       ArrayList<String> mylist = new ArrayList<>();

       for (int x = 0; x < 5; x++) {

           System.out.println("Please Enter a Word: ");

           String word = in.nextLine();

           mylist.add(word);

       }

       sort(mylist);

       sort(mylist2);

       for (String x: mylist) {

           System.out.print(x + ", ");

       }

       System.out.println("");

       for (int x: mylist2) {

           System.out.print(x + ", ");

       }

   }

   public static <E extends Comparable<E>> ArrayList<E> sort(ArrayList<E> list) {

       E temp;

       if (list.size()>1) // check if the number of orders is larger than 1

       {

           for (int x=0; x<list.size(); x++) // bubble sort outer loop

           {

               for (int i=0; i < list.size() - x - 1; i++) {

                   if (list.get(i).compareTo(list.get(i+1)) > 0)

                   {

                       temp = list.get(i);

                       list.set(i,list.get(i+1) );

                       list.set(i+1, temp);

                   }

               }

           }

       }

       return list;

}}

6 0
3 years ago
Which statement best describes top-down programming design?
MariettaO [177]

B is the answer (i think)

5 0
3 years ago
Other questions:
  • A computer which links several pcs together in a network is called
    10·1 answer
  • The force that pulls away from a curve is known as
    9·1 answer
  • What are the conditions for using still photos in a video program
    6·1 answer
  • What are the advantages of AI?????
    9·1 answer
  • A business traveler notices there is an extra connector between the keyboard and the computer, in a business center. She has mos
    12·1 answer
  • When Mary started college, her parents bought her a new computer that came loaded with the bare essentials in terms of software
    11·1 answer
  • The rock cycle _____.
    14·1 answer
  • What is reference file​
    8·2 answers
  • The default for automatic replies in outlook is what?
    6·2 answers
  • Because of the abundance of water on planet Earth, hydrogen gas (H2) is a candidate in the search for a replacement for petroleu
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!