السلام عليكم
قمت بكتابة برنامج لطباعة عدد القيم الموجبة والسالبة ولكنه لم يعمل كما أريد
#include <iostream>
using namespace std ;
void main ()
{
int num=0 , pos=0 , neg=0 ;
cout << " enter the numbers " << endl ;
while (num != 999)
{
cin >> num ;
num = num * -1 ;
if (num > 0)
neg ++ ;
else
pos ++ ;
}
cout << " postive numbers : " << pos << endl ;
cout << " negtive numbers : " << neg << endl ;
}