Answer Posted / geetha gajendiran
a simple program using array
#include<stdio.h>
void main()
{
int avg,sum=0;
int i;
int pay[30];/*array declaration*/
for(i=0;i<=29;i++)
{
printf("\n enter payment:");
scanf("%d",&pay[i]);/*store data in array*/
}
for(i=0;i<=29;i++)
sum=sum+pay[i];/*read data from an array*/
avg=sum/30;
printf("\n average marks =%d",avg);
}
| Is This Answer Correct ? | 20 Yes | 2 No |
Post New Answer View All Answers
How to delete a node from linked list w/o using collectons?
Define circular linked list.
Explain the difference between null pointer and void pointer.
What’s the special use of UNIONS?
#include
How can I call fortran?
What is the difference between mpi and openmp?
What are the differences between Structures and Arrays?
What is self-referential structure in c programming?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
What is structure in c explain with example?
develop algorithms to add polynomials (i) in one variable
What are two dimensional arrays alternatively called as?
Explain how do you list a file’s date and time?
what is bit rate & baud rate? plz give wave forms