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
Which driver is a pure java driver
Write a program to use switch statement.
How many main () function we can have in a project?
How can I open files mentioned on the command line, and parse option flags?
What is a c token and types of c tokens?
What is pass by value in c?
How do you define a string?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
How would you obtain the current time and difference between two times?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
Explain what is the difference between a free-standing and a hosted environment?
what is the different bitween abap and abap-hr?
what are the different storage classes in c?
Which of these functions is safer to use : fgets(), gets()? Why?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?