># include <stdio.h>
># include <conio.h>
Don't need this header
>
>void main()
main() returns int:
int main()
>{
>int Num = 1,no_of_odd = 0,no_of_even = 0;
>int OddsTotal,EvensTotal;
You have to initialize these to 0:
int OddsTotal=0,EvensTotal=0;
>float avg_even,avg_odd;
>printf("THIS PROGRAM CACULATES ODDS AVG AND EVENS AVG >DIFFERENTLY"

;
fflush(stdout);
Since output is usually line-buffered, this ensures the user will see the prompt before they can enter input.
>while(Num > 0)
> {
> printf("Enter a negetive number to Exit :"

;
fflush(stdout);
> scanf("%d",&Num);
> if(num <= 0) break;
0 isn't a legal value?
> if(num%2==0)
> {
> EvensTotal+=num;
> no_of_even++;
> }
> if(num%2!=0)
> {
> OddsTotal+=num;
> no_of_odd++;
> }
> }
>avg_even = EvensTotal/no_of_even;
>avg_odd = OddsTotal/no_of_odd;
>printf("Average of Even Nos. Entered : %f",avg_even);
>printf("Average of Odd Nos. Entered : %f",avg_odd);
printf("Average of Even Nos. Entered : %f\n",avg_even);
printf("Average of Odd Nos. Entered : %f\n",avg_odd);
>}
>
>So this is the code arq.
>
>
>I hope this was not an assignment.
It probably was, that's why I didn't post any code. I always make it a point not to do so unless the OP demonstrates that they've put some of their own effort into the problem.
Russ
bobbitts@hotmail.com