Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
C program for function of average
int average(int);
void main()
{
int max=0,c=0;
clrscr();
printf("ENTER THE LIMIT OF INPUT FOR AVERAGE: ");
scanf("%d",&max);
c=average(max);
printf("THE AVERAGE OF %d DIGIT IS %d",max,c);
getch();
}
int average(int i)
int j=0,n=0,sum=0;
for(j=1;j<=i;j++)
printf("ENTER THE DIGIT: ");
scanf("%d",&n);
sum=sum+n;
sum=sum/i;
return(sum);
OUTPUT :
ENTER THE LIMIT OF INPUT FOR AVG : 5
ENTER THE DIGIT: 5
ENTER THE DIGIT : 10
ENTER THE DIGIT : 15
ENTER THE DIGIT : 20
THE AVERAGE OF 5 DIGIT IS 12
Question: (a) (i) What is recursion? (ii) What advantage is there in its use? (iii) What disadvantage is there in its use? (b) The factorial of a positive number can b
Write a program that predicts users’ age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/she is younger or older than G (an initial gues
Write a c++ program that contain the following functions : 1) Function Quality_Point that takes one int argument (student_average) and return ‘A’ if the student_average between 90-
Optimize and Profile a C++ library for speed Project Description: Optimize and Profile an existing C++ library for speed. This library uses OpenMP and OpenCV and C++ stan
A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci
Object Initialization An object of a derived class can be initialized to an object of a base class. If both the classes have similar data members, then no specific constructor
Selection Sort using this a nested for loop to iterate through and compare the array elements. If the value of an element with lower index is greater than the value of an element w
Define some features of external storage class in c program? The features of an external storage class variable are as follows: Storage - memory Default initial value -
F u nction Returning Object: This program is like to the previous program except the function returns object. The main rule to be remembered is the function returning obj
Destructors A destructor function gets implemented whenever an instance of the class to which it belongs goes out of existence. The primary usage of a destructor function is
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd