c program find factors of number

list of programs: Write a c program Find factors of number using for loop, Write a C program find factors of  number using while loop, Write a C Program to find factors of numbers below n, Write a C Program to find factors of numbers between given range

c program find factors of number using for loop while loop between range
c program find factors of number using for loop while loop between range

Write a C program find factors of number using for loop

Write a C program to find factors of a number using for loop

#include<stdio.h>
#include<conio.h>
{
void main( )
{
int n , no;
clrscr( );
printf(“c program to print factors of integer using for loop\n”);
printf(“Enter the required number:”);
scanf(“%d”,&no);
printf(“\n The factors of number % d are: \n”, no);
for(n=2; n<=no; c++)
{
if(no%n==0)
printf(“%d \t”, n );
}
getch( );
}

Write a C program find factors of number using while loop

Write a C program find factors of  number using while loop

#include<stdio.h>
#include<conio.h>
{
void main( )
{
int n ,no;
clrscr( );
printf(“c program to print factors of integer using while loop \n”);
printf(“Enter the required number:”);
scanf(“%d”,&no);
printf(“\n The factors of number % d are: \n”, no);
n=2;
while(n<=no)
{
if(no%n==0)
printf(“%d \t”, c );
n++;
}
getch( );

Write a C Program to find factors of numbers below n

Write a C Program to find factors of numbers below n

#include<stdio.h>
#include<conio.h>
{
void main( )
{
int no,n, i=1 f=1;
clrscr( );
printf(“c program to print factors of numbers below n \n”);
printf(“Enter n :”);
scanf(“%d”,&n);
for(no=1;no<n;no++)
{
printf(“\n The factors of integer % d are: “, no);
while(i<no)
{
if(no%i==0)
{
printf(“%d \t”, c );
f=0;
}
c++;
} // end of while
if (f==1)
printf(“no factors”)
f=1;
printf(“\n”);
} // end of for
getch( );
}

Write a C Program to find factors of numbers between given range

Write a C Program to find factors of numbers between given range

#include<stdio.h>
#include<conio.h>
{
void main( )
{
int no,n, c ,f=1;
clrscr( );
printf(“C Program to print factors of numbers between given range n \n”);
printf(“Enter lower limit:”);
scanf(“%d”,&i);
printf(“\n Enter higher limit:”);
scanf(“%d”,&n);
for(no=i;no<n;no++)
{
print(“\n c program print factors between given range”);
while(c<no)
{
if(no%c==0)
{
printf(“%d \t”, c );
f=0;
}
x++;
} // end of while
if (f==1)
printf(“no factors”)
f=1;
printf(“\n”);
} // end of for
getch( );
}

Other programs:

Static variable scope
Register variable scope
External variable scope
Automatic variable scope
amicable number
Prime number
Perfect number
Palindrome number
Strong number
Find Factorial 
Biggest Number
Average of n numbers
decimal number to octal
decimal number to hexadecimal
convert decimal number to binary
simple interest
compound interest
Add sparce matrices
Add matrices
 file copying
Palindrome string
Reverse string
String length
Replace characters in string
substring or not using arrays
First occurrence of character in string
Last occurrence of character in string
Convert to uppercase
Convert to lowercase
Concatenate strings 
Compare strings
Generate Employee payslips
Count students scoring marks>50%
convert weight into grams

 

Leave a Reply

Your email address will not be published. Required fields are marked *