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
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Can 'this' pointer by used in the constructor?
What does the c in ctime mean?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
What is the g value paradox?
What is string function in c?
What are pragmas and what are they good for?
What is the correct code to have following output in c using nested for loop?
Are the variables argc and argv are always local to main?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What are the uses of a pointer?
What is the difference between malloc() and calloc()?
Write a factorial program using C.
How is a macro different from a function?