Ask Experts & Get Answers!!!

Friday, 28 June 2013

Write a C program to find all the factors of a given integer.

#include<stdio.h>
#include<conio.h>
void main( )
{
int no,x;
printf("Enter the required number:");
scanf("%d",&no);
printf("\nThe factors are:");
for(x=1; x<=no; x++)
{
if(no%x==0)
printf("\n%d",x);
}
getch( );
}
Posted by Unknown at 23:55
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2013 (14)
    • ►  July (1)
    • ▼  June (13)
      • Write a program using user defined function to pri...
      • Write a user defined function to compute xy.x and ...
      • Write a program using a recursive function to find...
      • Write a program using a recursive function & LOOP ...
      • Write a C program to find the value of nCr n and r...
      • Write a C program to find all the factors of a giv...
      • Write a C program to find the value of nPr, n and ...
      • Write a C program to print the following number py...
      • An Electric power Distribution Company charges its...
      • Write a C program which recognizes a letter whethe...
      • Write a program in C which checks a number if it i...
      • Write a program in C which finds the largest numbe...
      • Write a program that asks user an arithmetic opera...

About Me

Unknown
View my complete profile
Simple theme. Powered by Blogger.