boost learn study
Friday, March 28, 2014
Linear Array or One/Single Dimensional Array
/*Below program showing Liner array...*/ #include
#include
void main() { int a[5],i,sum=0; clrscr(); printf("\n Enter the Number:"); for(i=0;i<5;i++) { scanf("\t%d",&a[i]); } printf("\n After the Inputting Array:\n"); for(i=0;i<5;i++) { printf("\na[%d]=%d"i,a[i]); sum = sum + a[i]; } printf("\nSum=%d",sum); getch(); }
Output is as :
Read more �
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment