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 |
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
How to create struct variables?
If we give two names then this displays the connection between the two people. It is nothing but flames game
Explain about the constants which help in debugging?
Write a c program to print the sizes and ranges of different data types in c?
Magic square
print the pattern 1 2 4 3 6 9 4 8 12 16 5 10 15 20 25 if n=5
Is both getch() and getchar() functions are similar? if it is similar means why these two functions are used for same usage? if it is not similar means what is the difference?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
Write a function that accepts two numbers,say a and b and makes bth bit of a to 0.No other bits of a should get changed.
2 Answers Scientific Atlanta, Wipro,
What is indirection?
int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?