Docstoc

4

Document Sample
4 Powered By Docstoc
					#include<iostream.h> #include<conio.h> void main() { int a[10],i,n, nrcifre=0,s=0; cout<<"n=";cin>>n; while(n) {a[++nrcifre]=n%10; n=n/10;} for(i=nrcifre;i>0;i--) cout<<a[i]<<endl; for(i=1;i<=nrcifre;i++) if(i%2==0) s=s+a[i]; cout<<"s="<<s; getch();}


				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:10
posted:10/30/2008
language:
pages:1