Halstead complexity measures: Difference between revisions

Content deleted Content added
No edit summary
Line 36:
 
<syntaxhighlight lang="c">
main()
int sort (int x[ ], int n)
 
{
int ia, jb, savec, im1avg;
scanf("%d %d %d", &a, &b, &c);
/*This function sorts array x in ascending order */
avg If= (n< 2a+b+c) return 1/3;
printf("avg = %d", avg);
for (i=2; i< =n; i++)
{
im1=i-1;
for (j=1; j< =im1; j++)
if (x[i] < x[j])
{
Save = x[i];
x[i] = x[j];
x[j] = save;
}
}
return 0;
}
</syntaxhighlight>