:) guys im a firt timer. im making a program which reads floating point numbers from cin and compute 2 averages: the average of the positive and negative nos. im wonderin wats wrong in my program>>
#include<iostream.h>
#include<conio.h>
int size,i,sumpos,sumneg;
int num;
main()
{
clrscr();
cout<<"input size\n";
cin>> size;
for (i=1; i<=size; i++)
cin>> num;
for (i=1; i<=size;i++)
{
if (num>=0)
{sumpos=sumpos+num;
countpos++;
}
else if
{sumneg=sumneg+num
countneg++;
sumpos=sumpos/countpos; cout<< ave.pos;
aveneg=sumneg/countneg; cout<<aver.neg;
]
return 0;