Number of Factors

code
fault
in
is
mention
my
please
where

#1

I have submitted the code for " Number of Factors" and it showing Wrong Answer. But in which reason it displaying as wrong ? Please mention where is my fault. I checked it in Visual Studio but there its Okay.

#include<stdio.h>
int A[1000000];
int T=100;
int main(){
while (T–){
int Result=1;
int count=0;
int i,N;
scanf("%d",&N);
for (i=0;i<N;i++){
scanf("%d",&A*);
Result=ResultA;
}

for (i=1;i<=Result;i++){
	if (Result%i==0){
count++;
}
}

printf ("%d ",count);
printf("

");
}

return 0;

}


#2

please indent the code properly first and then submit your question


#3

#include
using namespace std;
int main()
{
int i,n,c=0;
cout<<“enter n value:”;
cin>>n;
for(i=1;i<=n;i++)
{
if(n%i==0)
{
c++;
}
}
cout<<“number of factors is:”<<c<<endl;
getch();
}