Question: all in C Language please RK AREA RESULTS Write a loop that reads positive integers from standard input and that terminates when it reads an




all in C Language please
RK AREA RESULTS Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. After the loop terminates, it prints out the sum of all the even integers read, the sum of all the odd integers read, a count of the number of even integers read, and a count of the number of odd integers read, all separated by exactly one space. Declare any variables that are needed. SUBMIT X 2 of 2: 2021-02-12 18:56:43 - W 1 int even=0; 2 int i=1; 4 while (i>0){ 5 scanf("%d",&i); 6 if ((i % 2)==0 && (i>0)) { 7 even+=i; 8} 9 10 ) 11 printf("%d", even); Exercise 10400 X deadline: 02/14/2021 11.59 WORK AREA RESULTS Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. After the loop terminates, it prints out the sum of all the even integers read and the sum of all the odd integers read. Declare any variables that are needed. SUBMIT x1 of 1: 2021-02-12 18:55:19 - Wy 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
