#include < stdio.h >
void main()
{
int i = 0;
int T;
int N;
printf("Enter the 'T' value : ");
scanf("%d",&T);
for(i = 0;i<T;i++)
{
printf("Enter the 'N' value");
scanf("%d",&N);
int number = 1;
int temp;
int j = 0;
for(j=0;j<N;j++)
{
printf("Enter values :");
scanf("%d",&temp);
number = temp *number;
}
j = 1;
int count = 0;
for(j = 2;j < number;j++)
{
if(number%j == 0)
{
count++;
}
}
if(number > 1)
{
printf("count = %d\n",(count+2));
}
else if(number == 1)
{
printf("count = 1\n");
}
else
{
printf("count = 0\n");
}
}
}
↧
Why this code gives runtime error
↧