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]
3 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]3 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]3 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
Where can i make a 3d animation for free ( pls don't trick me)
Vinvika [58]

Answer:

I don't know if it would work for what you need but you could try scratch. (sorry if this isn't what you needed.)

4 0
3 years ago
A group of developers for a startup company store their source code and binary files on a shared open-source repository platform
Jet001 [13]

Answer: AWS CodeCommit

Explanation:

The AWS service that the developers can use to meet the requirements that are illustrated in the question is the AWS CodeCommit.

The AWS CodeCommit is refered to as a fully-managed source control service which can be used in the hosting of Git-based repositories which are secure.

AWS CodeCommit makes it easy for the collaboration on code for teams in a secure ecosystem. CodeCommit can securely store binaries, source code etc.

8 0
3 years ago
The true or false questions.
tankabanditka [31]

Answer:

false

Explanation:

-exec option is not mandatory for the find command.

find will still list out the identified files even in the absence of -exec option.

For example:

find . -name test -print

will print out files with the name 'test' in the current directory. Note that there is no exec option in this example.

Same holds true for find with no additional options at all.

For example:

find .

will list out all files in the current directory.

3 0
3 years ago
Using a conversation voice is part of:
MaRussiya [10]
Need more information
4 0
3 years ago
I still need help, thank you! Will give Brainliest ​
wlad13 [49]

Answer: 1 what do u think to help u

6 0
3 years ago
Other questions:
  • Which part of the faucet is the aerator?
    13·1 answer
  • an object or device outside the computer, that one would plug into a port to control the functions of a computer are?
    9·2 answers
  • The file extensions .webm, .m4v, and .ogv are used for:
    15·1 answer
  • Customizing ads to people who had earlier visited the site is
    14·1 answer
  • Introduction to Identity and Fitting In
    7·1 answer
  • E-mail messages, instant messages (IMs), or text messages sent and/or received within an organization a. are not included on a r
    9·1 answer
  • Describe how a web browser and web server work together to send a web page to a user
    8·1 answer
  • Which graph is the solution to the system 2x – 3 and y &lt; 2x + 4?
    5·2 answers
  • How are computers used in education and entertainment? List them.​
    10·1 answer
  • How scientist and technology beliefs society
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!