Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C by StS ( 17 years ago )
#include <stdio.h>
#include <stdlib.h>
int main()
{
float a[7] = {1, 2.3, -5, 5.3, 6, -3, 8};
float sum = 0;
int i,count = 0;
for(i = 0 ; i < 7 ; i++)
{
if ( a[i] > 0)
{
sum =+ a[i];
count++;
}
}
printf ("S = %3.2f N = d\n", (sum/count) , count);
return 0;
}
Revise this Paste