C programming

Sunday, January 18, 2009

#include #include void main() { clrscr(); int arr1[20],arr2[20],n1,n2,sum=0,i; printf("Enter the size of the first array:"); scanf("%d",&n1); printf("Enter the size of the second array:"); scanf("%d",&n2); printf("\nElement of first array\n"); for(i=0;i { printf("Element[%d]=",i+1); scanf("%d",&arr1[i]); sum=sum+arr1[i]; } printf("\nElement of second array\n"); for(i=0;i { printf("Element[%d]=",i+1); scanf("%d",&arr2[i]); sum=sum+arr2[i]; } printf("The summation of two array is=%d",sum); getch(); }

0 comments:

Visitors

PlugIn.ws - Free Hit Counter, Web Site Statistics, Traffic Analysis

  © Blogger template Leaving by Ourblogtemplates.com 2008

Back to TOP