answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

int main(void)

{

float a,b,c,d,avg=0;

clrscr();

printf("\n Enter the four floating point nos.\n");

scanf("%f%f%f%f",&a,&b,&c,&d);

avg=(a+b+c+d)/4;

printf("\n the average is=%10.5f",avg);

getch();

return 0;

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

What does the strictfp keyword do in Java?

strictfp forces floating points (and any floating-point operations) to adhere to the IEEE 754 standard. With strictfp, you can predict how your floating points will behave regardless of the underlying platform the JVM is running on. The downside is that if the underlying platform is capable of supporting greater precision, a strictfp method won't be able to take advantage of it.


Does a number stored as an integer take up less space in the computer's memory than a floating points number?

It depends on the particular implementation's representation of integer and floating point number. The IEEE 754-2008 standard provides four basic resolutions, 16 bits (not common), 32 bit, 64 bits, and 128 bits (also not common). At the same time, integers can be 8 bits, 16 bits, 32 bits, 64 bits (in 64 bit platforms and some libraries on 32 bit platforms) and 128 bits (not common). In general, if you want to keep resolution down to the units digit, you can store a larger number in an integer than you can in a floating point, due to overhead in the exponent, but, at the same time, due to the scalability of floating point numbers, you can store larger numbers in floating point numbers if you are willing to lose resolution on the low-order end.


What is difference between stack pointer and program counter?

Both of them are pointers, but otherwise they are completely unrelated. The former points to the current position of the stack, the latter points to the current instruction of the program.


Write a c program to compute the average of 3 input quizzes then display the result?

#include &lt;stdio.h&gt; #include&lt;iostream.h&gt; #include&lt;conio.h&gt; #include&lt;windows.h&gt; int main() { int q1, q2, q3, ave; printf ("Enter 1st quiz: "); scanf ("%d", &amp;q1); printf ("Enter 2nd quiz: "); scanf ("%d", &amp;q2); printf ("Enter 3rd quiz: "); scanf ("%d", &amp;q3); ave=(q1+q2+q3/3); printf ("Average quiz is %d", ave); getch() ; }


What are the reference or datum points on a cnc lathe machine?

depending on machine-x and z zero machine reference points are in the upper right hand corner(away from workpiece) whereas your programmable origin point used for your specific program is completely up to you.

Related Questions

What is float ADT?

A float ADT refers to the Abstract Data Type that represents floating-point numbers in a computer program. It typically includes operations for arithmetic calculations like addition, subtraction, multiplication, and division on floating-point numbers. Floats are used to represent real numbers with decimal points in programming and are implemented in languages like C, Java, and Python.


What is the full form of FPU?

FPU stands for Floating Point Unit. It is a specialized part of a computer's central processing unit (CPU) responsible for handling calculations involving floating-point numbers, which are numbers with decimal points or numbers that require very high precision calculations.


What are the key differences between floating point and integer data types?

The key difference between floating point and integer data types is how they store and represent numbers. Integer data types store whole numbers without any decimal points, while floating point data types store numbers with decimal points. Integer data types have a fixed range of values they can represent, while floating point data types can represent a wider range of values with varying levels of precision. Floating point data types are typically used for calculations that require decimal precision, while integer data types are used for whole number calculations.


What is the RCI Points program?

The RCI Points program is part of a timeshare program. Members of the program gain points that can then be exchanged for vacation exchanges, and more points allow more perks for the member.


When float exist?

Floats exist in programming languages to represent decimal numbers. They are used to store values with decimal points and are typically defined as floating-point numbers. Floats are useful for calculations that require high precision and accuracy in handling fractional numbers.


What is floating point error?

A method for storing and calculating numbers in which the decimal points do not line up as in fixed point numbers. The significant digits are stored as a unit called the "mantissa," and the location of the radix point (decimal point in base 10) is stored in a separate unit called the "exponent." Floating point methods are used for calculating a large range of numbers quickly. Floating point operations can be implemented in hardware (math coprocessor), or they can be done in software. In large systems, they can also be performed in a separate floating point processor that is connected to the main processor via a channel.


What is the average score of the numbers 44 28 and 18.?

To find the average of a data set take the sum of the numbers and divide that by the number of data points in the set. In practice, this means doing: (44+28+18)/3=30. 30 is the average.


What is a GFLOP?

A GFLOP (or gigaflop) is a unit of processing speed for computers and processor chips. A gigaflop is one billion floating-point (numbers that include many decimal points) operations (calculations) a second.


What is the rate in math?

The rate, or rate of change is like an average all except it has to do with the slope of a line instead of a group of numbers. Finding the rate of change is like finding an average except you use the points on the graph instead of numbers in a group.


What are the boundary points of irrational numbers?

There are no boundary points.


How do you find the median when theres two middle numbers?

For an even number of data points the median is the average of the middle two values. I.e. add the two numbers and divide by 2.


Who is in charge of Petro Canada's Petro Points program?

Suncor is the parent company that is ultimately responsible for the Petro-points program.