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
The statement, int(*x[]) () what does in indicate?
How can I dynamically allocate arrays?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
What is calloc() function?
What is define c?
What is pass by reference in c?
Why cant I open a file by its explicit path?
Explain what are global variables and explain how do you declare them?
Can we assign integer value to char in c?
What is the difference between printf and scanf )?
Are the expressions * ptr ++ and ++ * ptr same?
What is the difference between int main and void main?
what is the difference between 123 and 0123 in c?
What is a static function in c?
What is data types?