Yes it is homework... i would apreciate any help... this script does almost anything...
Code:
#include<stdio.h>
//declaracion de variables.
int m, n, I, num;
void LeerDatos()
{
printf("Ingrese el Primer Numero: ");
scanf("%d",&m);
printf("Ingrese el Segundo Numero: ");
scanf("%d",&n);
}
void ejecutar()
{
for (num = m; num <= n; num++) //el contador num va de m a n
{
for(I = 1; I <= num; I++)//se utiliza la variable I como contador para dividir al "num"
{
if (num%I == 0) //si el residuo de num/I es igual a 0,etonces "I" es un divisor de "num".
{
printf("\n%hd es divisor de %hd.",I,num);
if (I == num)
printf("%s","\n");
}
}
}
}
main()
{
LeerDatos();
ejecutar();
getchar();
getchar();
}
Wraithan Show us your code... I have had this assignment before, and I assume this is homework.