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
- Create a program that uses at least two functions that will be called from your main. This program is a number game program that asks for parts of your phone and after manipulati
Write a C++ program according to the following specifications 1. Display a brief description of the program. 2. Ask the user to specify the type of loading (end load, intermediate
The Special Pointer 'this' When various instances of a class come into existence, it naturally follows that each instance has its own copy of member variables. If this were not
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
Increment and Decrement Operators. The operator for increment is '++' and decrement is '-'. These operators enhances or decrease the value of a variable on which they are ope
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec
Hi is there any chance to get assignment for fresher tutor
Program to design list in c: Write a program in c to insert the values in list void main() { int i=0; char a[20]; clrscr(); printf("Enter the line\n");
Program is to reverse the names stored in an array pointer: Program is to reverse the 6 names stored in an array pointer as name[] void main() { clrscr(); char
We are now quite happy to use the basic mathematical expressions, however in engineering we use scientific functions i.e Sin , Cos , ln etc . Within C we have the following functi
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