Created
January 18, 2019 20:05
-
-
Save sayantanHack/78aa86e650f1d95a388b7b86ec085113 to your computer and use it in GitHub Desktop.
adding array elements & showing them
This file contains 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> | |
int main(void){ | |
int i, nums[50], n; | |
printf("Enter the number of the array, array size max is 50 : "); | |
scanf("%d",&n); | |
// addding numbers to the array | |
for(i=0;i<n;i++){ | |
scanf("%d",&nums[i]); | |
} | |
//showing the array | |
for(i=0;i<n;i++){ | |
printf("%d ",nums[i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment