SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to calculate average using arrays
C program to calculate average using arrays
Output:
Enter the number of elements:
5
Enter the value of each element:
90 90 90 90 90
Average = 90.000000
Implementation:
#include
int main(void) { int n,num,i,sum=0; int a[1000]; float average; printf("Enter the number of elements:\n"); scanf("%d",&n); printf("Enter the value of each element:\n"); for(i=0;i
PREVIOUS
NEXT
HOME