/* Sum of the +ve, -ve number until -1000 with out using array*/
#include<stdio.h>
main()
{
	int pos_sum=0,neg_sum=0,number;
	clrscr();
	printf("Enter the Values\n");
	for(scanf("%d",&number);number!=-1000;scanf("%d",&number))
	{
		if (number>0)
			pos_sum=pos_sum+number;
		else
			neg_sum=neg_sum+number;
	}
	printf("Sum of the Positive Numbers=%d\n",pos_sum);
	printf("Sum of the Negative Numbers=%d\n",neg_sum);
	getch();
}

/*	input : 1 3 5 7 -2 -4 -6 -8 -1000
	output:
		Sum of the Positive Numbers=17
		Sum of the Negative Numbers=-20
*/
/*	Exercise: 1. Mean of positive and negative numbers until 0
		  2. Sum of the odd and even numbers until 0
*/