
-----------------------------------
saltpro15
Mon Mar 02, 2009 5:26 pm

question help
-----------------------------------
So I'm working on this question out of boredom, and I seem to be braindead today, because for the life of me I cannot get this to work :(
https://www.spoj.pl/problems/SIZECON/

here is what I have so far

*note the fstreams are just for my notes, they aren't actually part of the question
AND BEFORE ANYONE ASKS:  I use Bluefish as an editor and compile with g++


#include 
#include 
using namespace std;

int main() {
ifstream fin ("SIZEIN.txt");
ofstream fout ("OUT.txt");
int num;
int input;
int newinput;
int newnewinput;
fin >> num;
for (int a = 0; a < num; a++) {
fin >> input;
if (input > 0) {
newinput = input;
newnewinput = newinput + input;
}
}
fout 