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
Write algorithms to implement the insertion and deletion operations.
Use of random function: int main(void) { int i,j; for(j=0;j { // randomize(); for(i=0;i printf("%d\n", ran
Write a c++ program to find the sum of 0.123 ? 103 and 0.456 ? 102 and write the result in three significant digits.
Differentiate between the expression "++a" and "a++"? - With ++a, increment happens first on variable a, and resulting value is used. This is known as prefix increment. - Wi
How are postfix and prefix versions of operator++ () differentiated? A: The postfix version of operator++ () contain a dummy parameter of type int. The prefix version does not c
A: Use references when you can use, and use pointers when you have to. References are generally preferred over pointers whenever you don't require "reseating". Usually this mean
What data structure would you mostly likely see in a nonrecursive implementation of a recursive algorithm?Minimum 100 words accepted#
I want Skype Recorder Application + Setup + Sourcecode + NICE UI Project Description: i want an application built which will allow user to record skype audio or video calls
how do you declare an integer variable
write a program that counts the number of occurences of the string in the n-th Padovan string P(n) program in java // aakash , suraj , prem sasi kumar kamaraj college progr
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