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
What are loops in c?
What are the types of data structures in c?
How do you use a 'Local Block'?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
Can one function call another?
Is there anything like an ifdef for typedefs?
Describe explain how arrays can be passed to a user defined function
Describe newline escape sequence with a sample program?
Is struct oop?
Explain what does the format %10.2 mean when included in a printf statement?
Why isn't any of this standardized in c? Any real program has to do some of these things.
What is the value of c?
How can you be sure that a program follows the ANSI C standard?
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
How do we declare variables in c?