Home › Forums › C Programming › plz..help me i m a beginner › Reply To: plz..help me i m a beginner
November 13, 2007 at 4:10 am
#3270
Priyanka Rajput
Participant
Hi,I am MUNNA studying mca(master of computer applications) in GITAM university at vizag ,andrapradesh state,INDIA.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include<stdio.h><br /> void main()<br /> {<br /> int a[50],n,temp=1,oddsum=0;<br /> <br /> printf("enter how many elements do u want to enter");<br /> scanf("%d",&n);<br /> printf("enter the numbers");<br /> for(int i=0;i<n;i++)<br /> scanf("%d",&a);<br /> for(i=0;i<n;i++)<br /> {<br /> while((a%2!=0)&&(a>0)&&a<=30)<br /> oddsum=oddsum+a;/*sum of odd numbers*/<br /> <br /> while((a%2==0)&&(a>0)&&a<=30)<br /> temp=temp*a;/*multipliaction of evens*/<br /> }<br /> } |