read a number & print all its devisors using c-program?
Answer Posted / karna
//all devisors of a number
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i;
printf("Enter the number");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
if((n%i)==0)
{
printf("%d\n",i);
}
else;
}
getch();
}
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
What are the types of unary operators?
What are two dimensional arrays alternatively called as?
What are the 5 organizational structures?
What is the easiest sorting method to use?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
What are multidimensional arrays?
What is atoi and atof in c?
How can you find the day of the week given the date?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
What are pointers really good for, anyway?
What are inbuilt functions in c?
What is the use of header files?
What are the storage classes in C?
What is the size of structure pointer in c?