Alice and Bob are very happy as they got many pumpkins from their farm.Now both of them decides to sell the pumpkin's.Before selling the pumpkins they need to find out how much money they will get by selling these pumpkins.They came to knew from one of their friend that all the shops in code city use the same strategy for calculating the price.The strategy is that if the pumpkin weights, W kilos and if it can be divided into two parts such that the weight of both the parts is an even number then that pumpkin is given an amount of 50.Please help Bob and Alice by writing a computer program to find out the total amount they will get when they sell these pumpkin's.

1
please give me the answer in c program

Answers

2014-09-25T13:30:37+05:30
Nclude<stdio.h> 
int main() 

int N,W[10],iamt=0,i=0; 
scanf("%d",&N); 
if((N<=10)&&(N>=1)) 

while(i<N) 

scanf("%d",&W[i]); 
i++; 
}} 
else 

return 0;} 
for(i=0;i<N;i++) 

if((W[i]<=100)&&(W[i]>1)) 

if(W[i]!=2) 

if(W[i]%2==0) 
iamt=iamt+50;} 


printf("%d\n",iamt); 
return 0; 
}
0