Get Answers to all your Questions

header-bg qa

write a program to store 10 numbers in array and find out sum, maximum and average of these 10 numbers.

Answers (1)

best_answer

#include <stdio.h>
#include <ctype.h>
int main() 
   int i;   
int number[10];   
int n;   
int x;   
int j;   
int temp; 
 printf("Type number of elements:"); 
scanf("0",n); 
 for(i=0;i<n;i++) 
  printf("Enter element 0:",i+1); 
 scanf("0",&number[i]);    
   for(i=0;i = n-i;i++)        
       x=0;             
for(j=0;j<n-1-i;j++)                                        
  if (j >j+1)             
 temp = j;        j = j+1;       
number[j+1]= temp;       
 x++;        
 getchar();   
 getchar();       
 return(0);   
 

Posted by

Deependra Verma

View full answer