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 TOTAL & AVERAGE IN THE ARRAY
#include stdio.h>
#include conio.h>
#include string.h>
void main()
{
int i=0,n[100],limit=0,a=0;
float b;
clrscr();
for(i=0;i<100;i++)
n[i]=0;
}
printf("\nENTER THE LIMIT OF ELEMENTS: ");
scanf("%d",&limit);
for(i=0;i { printf("\nENTER THE %d ELEMENT: ",i+1); scanf("%d",&n[i]); a=n[i]+a; } b=a/i; printf("\nTHE TOTAL IS %d",a); printf("\nTHE AVG OF ALL NO IS %f",b); getch(); } OUTPUT : ENTER THE ELEMENTS : 3 ENTER THE 1 ELEMENTS : 10 ENTER THE 2 ELEMENTS : 10 ENTER THE 3 ELEMENTS : 10 THE TOTAL IS 30 THE AVG. OF ALL ELEMENTS : 10.000
printf("\nENTER THE %d ELEMENT: ",i+1);
scanf("%d",&n[i]);
a=n[i]+a;
b=a/i;
printf("\nTHE TOTAL IS %d",a);
printf("\nTHE AVG OF ALL NO IS %f",b);
getch();
OUTPUT :
ENTER THE ELEMENTS : 3
ENTER THE 1 ELEMENTS : 10
ENTER THE 2 ELEMENTS : 10
ENTER THE 3 ELEMENTS : 10
THE TOTAL IS 30
THE AVG. OF ALL ELEMENTS : 10.000
If quicksort is so quick, why bother with anything else? If bubble sort is so bad, why even mention it? For that matter, why are there so many sorting algorithms? Your mission (sho
Create a Document that show information about albums. First create a paragraph or two about the purpose of the page and your interests in music: genres, styles, etc. Next have a
What is the difference among a copy constructor and an overloaded assignment operator? Ans) A copy constructor constructs a latest object by using the content of the argument
Operator Overloading Fundamentals The C language uses the concept of Operator Overloading discreetly. The asterisk (*) is used as multiplication operator as well as indirect
Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send
Explain about the String Constants in c language? A collection of characters included within a pair of double quotes is treated as string constant. The character may be numbers
wap to cheak if a number is palindrom
explain the function of five elements that are found on a motherboard#
drawbacks in assignments in engeenirng
Define the Increment and Decrement Operators in c language? C offers two special operators -and ++ called decrement and increment operators respectively and these are unary ope
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd