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
External Variables Different functions of the similar program can be written in different source files and can be compiled together. The scope of a global variable is not limit
All languages are divided into six sections: - variables, I/O maths, conditional expressions, arrays, functions, subroutines and file handlers. Learning a software language is simi
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome
Structures A structure is a user-defined data type, which may have different data types as its members. Creating a structure is a two-part process. First, a structure template
#question.College life is tough. Eating pizza for every meal is hitting you hard. You are looking at working out to stay healthy. You found a web site that tells you how many ca
#include using namespace std; void print(int marks_arr[],int cnt) { int ind[cnt]; int i=0; int j=0; int k=0; int s=0; for(k=0;k { ind[k]=0; } int cnt1=0; for(i=0;i
How can one handle a destructor that fails?
A: Use operator overloading to present a friend right-shift operator, operator>>. It is similar to the output operator, except the parameter doesn't contain a const: "Fred&" instea
overloadstream insertion opertator to display the data of object on the console
M em b e r d e r e f e r e n c i ng o p e r a t o r s: T h e s e op e r a t o r s w i l l b e d i s c u s s e d l a t
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