7 Ocak 2011 Cuma

Find the total positives and negatives number of 10 input

#include
#include
int main(){
int x,num,neg=0,pos=0;

for(num=0;num<10;num++){ cin>>x;

if(x<0) neg++; if(x>0)
pos++;
}
cout< getch();
return 0;
}

0 yorum:

Yorum Gönder

İzleyiciler