Created
April 23, 2013 16:49
-
-
Save hrshadhin/5445325 to your computer and use it in GitHub Desktop.
Add numbers from two different arrays
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| void TAsum(int nam1, int nam2);//fuction prototype | |
| int main() | |
| { | |
| int i; | |
| int a1[]={2,3,4,5,6}; | |
| int a2[] = {9,8,7,5,2}; | |
| for(i=0;i<5;i++) | |
| { | |
| TAsum(a1[i],a2[i]);//call the function | |
| } | |
| return 0; | |
| } | |
| void TAsum(int nam1, int nam2) | |
| { | |
| printf("%d",nam1+nam2);//show the result of addition of 2 differents arrays value | |
| printf("\n"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment