ok got it to print out proper outputs awesome ya! cool now where i start getting more irritated haha so check it out:
now what im trying to do is get it to produce a count of the total number of factors any helpful hints ive been running through pages of sites trying to find anything that may help but nothing any help would be amazing even if its just something i should use
Code:
#include <stdio.h>
int main () {
int integer, factors, number_factors, sum, product;
//This will take in the input of the integer
do{
printf("Enter a positive integer greater than one.\n");
scanf("%d", &integer);
//This will print the appropriate invalid number message
if (integer<=1)
printf("Sorry, that input is not valid.\n");
}
//This will execute as soon as integer is greater than 1
while (integer<2);
//This will print out the factors
for(factors=1;factors<=integer;factors++){
if(integer % factors == 0)
printf("%d ",factors);
}
//This will go to the next line
printf("\n");
system("PAUSE");
return 0;
}