Removing uneeded file.
[and.git] / PC^2 / pc2team / samps / isumit.cpp
blob9078db0b19a4477af625cfb80a45abc15d6874df
2 //
3 // File: isumit.cpp
4 // Purpose: to sum the integers from stdin
5 // Author: pc2@ecs.csus.edu or http://www.ecs.csus.edu/pc2
6 //
7 // Thu Oct 2 20:28:19 PDT 2003
8 //
9 // $Id: isumit.cpp,v 1.1 2005/03/06 05:34:39 laned Exp $
13 #include <iostream.h>
14 #include <fstream.h>
16 main ()
18 int num;
19 int sum;
21 sum = 0;
23 cin >> num;
24 while(num != 0)
26 if (num > 0)
28 sum += num;
30 cin >> num;
33 cout << "The sum of the positive integers is " << sum << endl;
36 // eof isumit.c $Id: isumit.cpp,v 1.1 2005/03/06 05:34:39 laned Exp $