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!
Write a program to calculate the average of ten numbers #include stdio.h /* Only this header is needed since only IO are used */ void main() { char prompt; int i; float b[12]; float sum, average; for (i = 1;i <=10;i++) { /*Load up the array with the data*/ printf("Please enter in your number \n\r"); scanf("%f",&b[i]); /* Note that the index must be an integer Whole number of boxes */ } sum = 0.0; for (i = 1;i <=10;i++) { /* Calculate the sum of all the array elements*/ Sum += b[i]; } printf("The average of the following numbers\n\r "); /* Display the numbers from the array */ for (i = 1;i <=10;i++) { printf("%10.2f \n\r",b[i] ); } /*Calculate the average and display it */ average = sum / 10.0; printf("Is = %10.2f \n\r", Average ); printf("Press any key to exit \n\r"); scanf("\n%c",&prompt); }
Although we could have done this in one For loop, it shows that the numbers typed in are easily accessible any time within the program It is possible to extend the array to more than one dimension. Although with regards to memory there in no difference, we can consider each element (x) as a filing cabinet which contains (Y) files i.e.
A[2][3] cabinet 2 file 3
This technique is useful in data processing and matrix manipulation for graphics and CAD applications. We can think of a 2 dimension array (2x2) as a grid or matrix. A better technique of storage is that of the structure.
Ask4. Write a query to display the columns listed below. The query should list each customer in which the video rental is overdue. The Days_Overdue column should calculate the numb
What is the difference among const char *myPointer and char *const myPointer? A: Const char *myPointer is a non constant pointer to constant data; whereas char *const myPointer
conceptual difference between big o,big thete and big omega
How to write C program (interest calculator) the simple interest on a loan is calculated by the formula interest=principal*rate*days/365; ?
I am seeking an expert to create a 360 degree virtual tour in KRPano for use on PCs, tablets and smartphones. You will be given with panoramas in order to create an advanced KRPano
Program of cascading: class vector{ private : int v[3]; public: friend istream & operator >> (
Write a 3-4 page paper (350 words per page) in APA format detailing the development and use of C++ in academia and in industry. Explain the pros and cons of C++ as a programming la
I started preparing an alternative cryptocurrency and I am way over my head. I would like help in making modifications to the open source files and then help with deployment. I wil
Project Description: I have a code that works different on 64 bit and 32 bit system. Code is relative to some crypt functions, similar, but not equal to: I have to move fr
Define the Recursion Function in C? In C, it is potential for the function to call themselves a function is describing 'recursive' if a statement within the body of a function
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