Question: Identify the errors and rewrite the correct statement #include #include 3 main(){ 4 int i,j,x[8]; 5 double sum; 6 int prod=1; 7 for(i=0;i

Identify the errors and rewrite the correct statement

  1. #include
  2. #include

3 main(){

4 int i,j,x[8];

5 double sum;

6 int prod=1;

7 for(i=0;i<=8;i++)

7 scanf(%d,x[i]);

8 for(j=0;j<8;j++){

9 if(abs(x[i])%2== 1)

10 sum+=x[i];

11 else

12 prod*=pow(x[i],2)

13 }

14 printf(sum=%f and prod=%d,sum,prod);

15

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!