Grrr this stuff is still new to me
So I'm still getting used to this programming thing and i can't figure this out so I run here for help. If you choose to help me Thank you in advance
heres the code
Code:
#include <iostream>
using namespace std
int main(int, argc, char*, argv[])
{ int num=0, sum=0, cnt=0, largest=0, negative=0;
while (cin)
{ cnt ++;
cin>>num;
cout << "input"<<num<<endl;
sum=sum+num // or sum+=num;
cout <<"sum="<<sum<<endl;
if (num > largest)
largest + num;
if (num<0)
negative++;//or negative=negative+1;
}
cout,,"largest="<<largest<<"negative="<<negative<<endl;
<<"sum="<<sum<<endl;
return 0;
}
and if you can suggest a good book to help me on my way that will also be much appreciated
THANKS!