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
Marina CMI [18]
2 years ago
14

Given an int as the input, print all the factors of that number, one in each line. For example, if the input is 15 The output wi

ll be 1 3 5\
Computers and Technology
2 answers:
sasho [114]2 years ago
5 0

Answer:

#include<iostream>

using namespace std;

int main()

{

int num, temp = 1;

cout << "Enter the number to determine its factors : " << endl;

cin >> num;

cout << "The factors of " << num << " are : " << endl;

while (temp <= num)

{

if (not(num % temp))

cout << temp << " ";

temp++;

}

cout << endl;

}

Explanation:

trapecia [35]2 years ago
4 0

Answer:

The program to calculate factor can be given as:

Program:

#include <stdio.h> //include header file

int main() //defining main function

{

   int a,i; //defining integer variable

   printf("Enter any number: "); //print message

   scanf("%d",&a); //input value from user end

   for(i=1;i<=a;i++) //loop for calculate factor values

   {

       if(a%i==0) //define condition for factor

       {

           printf("%d\n",i); //print values

       }

   }

   return 0;

}

Output:

Enter any number: 15

1

3

5

15

Explanation:

In the above C language program the header file is include that provide the use of basic function, in the next line the main method is defined, inside this method two integer variable "a and i" is defined in which variable a is used to take value from user end and variable i is used in loop and conditional statement.

  • In the next step, for loop is declare, that start from 1 and end with value of variable a, inside a loop, if block is used that checks (a%i==0), in this if variable i value modeler value equal to 0.  
  • The loop will use the print function that prints variable "i" element in a new line, which is the factor the values.  

You might be interested in
“Click” is a type of user input the onEvent code checks for in order to perform actions like going to another screen. List at le
Sidana [21]

Answer:

typing, commands, scrolling. hope this helps

5 0
2 years ago
Which is the best video games​
Travka [436]

Answer:

overwatch and dead by daylight

5 0
2 years ago
Read 2 more answers
You are testing a site and realize that when you click a graphic link you see an outline but no picture. What is wrong with the
deff fn [24]

Pictures not loading on websites Chrome – Many users reported that pictures aren't loading on websites in Chrome. To fix the problem, be sure to check your Chrome settings and disable your antivirus. Images won't load in Chrome – Sometimes this issue can appear if JavaScript is disabled in your browser.

Explanation:

Speaking of image problems, users reported the following issues:

  • Broken image icon Firefox, Internet Explorer – According to users, you might be able to experience this issue in other browsers including Firefox and Internet Explorer. If the problem appears in other browsers, the issue is related to your system or to your network configuration.
  • Pictures not loading on websites Chrome – Many users reported that pictures aren’t loading on websites in Chrome. To fix the problem, be sure to check your Chrome settings and disable your antivirus.
  • Images won’t load in Chrome – Sometimes this issue can appear if JavaScript is disabled in your browser. If that’s the case, simply enable JavaScript and the problem will be resolved.
  • Chrome showing broken images – In some cases, extensions can lead to this problem, and if you noticed that your images are missing, simply disable or uninstall your extensions and check if that solves the problem.
  • You can remove an image from the preview by clicking the thumbnail below Available images. Edit Descriptions: If you've added multiple images, click the description below each image in the preview to edit it.
  • Icon in the top-right corner of the window. Select Internet Options. In the Internet Options window, click the Advanced tab. In the Settings under Multimedia, make sure there is a check in the Show Pictures check box.
7 0
2 years ago
There are___standard colors for text in a theme.
Stella [2.4K]
There are two standard colors for a text in a them
6 0
3 years ago
Which program controls the windows startup sequence
mylen [45]

Of the different freeware and shareware programs available, two of the most popular are Xteq X-Start from Xteq Systems, and Startup Control Panel by Mike Lin. X-Start is a full-blown tweaking utility thats free for non-commercial use, and enables you to edit just about every element of a Windows system, including relevant startup and shutdown settings.

6 0
2 years ago
Other questions:
  • Which icon will automatically adjust the amount of space between letters from very tight to very loose in style? Hyphenation, Te
    6·2 answers
  • In general, what is the leftmost point of a circle with radius r centered at (x,y)?
    8·1 answer
  • Can an engine run on air? I think it can, but I am not sure
    5·2 answers
  • What is the radix transformation method?
    5·1 answer
  • Give me 3 facts and 3 opinions
    5·1 answer
  • Nosql is a great technology for storing well-structured data. <br> a. True <br> b. False
    8·1 answer
  • When using the Internet, it is important to know the validity of web page you are using. How can you know if the information is
    5·1 answer
  • Write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs the smalle
    11·1 answer
  • What are the three common forms for mining structured and unstructured data?
    14·1 answer
  • Using a conversation voice is part of:
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!