64 593
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #13851 in C++ for Darryl kaye Abella Sanga

Question #13851
Write a program that will ask the user to enter a number and display all the factor of the number.
Expert's answer
#include<stdio.h>
void findfact(int num)
{
int i;

for(i=1;i<num;i++)
{
if(num%i==0)
printf("Factor for %d is
%d\n",num,i);
}
}
void main()
{
int a;
printf("\nEnter a
number:");
scanf("%d",&a);
findfact(a);
scanf("%d",&a);

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions