im almost complete mr.groovicus! i didn't use the integer sum and prod anymore..
it is not yet finished, but it works!
this program is for multiplying all negative numbers that you input
and add all the positive numbers that you input.
here is the code:
#include <stdio.h>
main()
{
int a,b,c,d;
clrscr();
printf("enter 1st number:");
scanf("%d",&a);
printf("enter 2nd number:");
scanf("%d",&b);
printf("enter 3rd number:");
scanf("%d",&c);
printf("enter 4th number:");
scanf("%d",&d);
if(a<0&&b>0&&c>0&&d>0)
{
printf("the product is:%d\n",a);
printf("the sum is:%d\n",b+c+d);
}
else if(a<0&&b<0&&c>0&&d>0)
{
printf("the product is:%d\n",a*

;
printf("the sum is:%d\n",c+d);
}
else if(a<0&&b<0&&c<0&&d>0)
{
printf("the product is:%d\n",a*b*c);
printf("the sum is:%d\n",d);
}
else if(a<0&&b<0&&c<0&&d<0)
{
printf("the product is:%d\n",a*b*c*d);
printf("there is no sum\n");
}
else
printf("the program is incomplete and cannot calculate that");
getch();
}