read a number & print all its devisors using c-program?

Answer Posted / vclingisetty@gmail.com

#include<stdio.h>
#include<conio.h>
void main()
{
int n,i;
clrscr();
printf("enter a number\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
if(n%i==0)
printf("%d",i);
}
getch();
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is uint8 in c?

868


What do you mean by Recursion Function?

844


Is c language still used?

719


hi send me sample aptitude papers of cts?

1858


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

1821


What is c method?

736


What does a function declared as pascal do differently?

796


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

844


Which is better malloc or calloc?

852


What is pointers in c?

882


What is dynamic variable in c?

776


I heard that you have to include stdio.h before calling printf. Why?

803


What is an lvalue?

831


Explain the use of 'auto' keyword

870


What are the advantages of c language?

845