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
The for Loop For loop is the controlled form of loop. The general format of this : for( initialize ; test ; update) { statements;
Reference Types The symbol "&" is interpreted as an address operator as well as AND operator. This operator is also used to declare a "reference variable". A reference is refer
Define the Keywords of c language? C keeps a small set of keywords for its personal use. These keywords can't be used as identifiers in the program. Here is the list of keyword
pseudocode for gregorian calendar
C o n t r o l S t r u c t u r e s I t i s o f t h r e e t y p e s: 1 . S e qu e n c e s t r u c t u r e 2 .
What happens if you write following code? string& foo()
Define a function in c program: int f1() { static int x=10; return x; } int f2() { int y=5; return y; } extern int z; void f() {
how do you declare an integer variable
1 Aims The main purpose of the assignment is to let you practice the following programming techniques: perform operations on pointers to basic and more complex types;
Expected output of the program: 1. Consider the following programs. For each, indicate whether the program is correct. If yes, what is the expected output? If not, what is the
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