write a program structure to find average of given number
Answer / manjunath
#include<stdio.h>
#include<math.h>
void main()
{
int num,a[100],sum=0;
float average;
printf("enter the number of elements");
scanf("%d",&num);
printf("enter the elements");
for(i=0;i<num;i++)
{
scanf("%d",&a[i]);
}
printf("the elements are");
for(i=0;i<num;i++)
{
printf("%d",a[i]);
}
for(i=0;i<num;i++)
{
sum=sum+a[i];
}
average=sum/num;
printf("%f",average);
}
| Is This Answer Correct ? | 13 Yes | 9 No |
void main(int argc,char *argv[],char *env[]) { int i; for(i=1;i<argc;i++) printf("%s",env[i]); }
Explain what is output redirection?
What is printf () in c?
coding for Fibonacci.?
print the pattern 1 2 4 3 6 9 4 8 12 16 5 10 15 20 25 if n=5
What is #line in c?
related to rdbms query .
two progs are given. one starts counting frm 0 to MAX and the other stars frm MAX to 0. which one executes fast.
What is the difference between new and malloc functions?
How can I write functions that take a variable number of arguments?
Explain a file operation in C with an example.
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics