Create a function w/c accepts as input the double numbers x1,x2,x3 and returns to the program the value of the average (x1+x2+x3)/3 as a variable parameter.
#include<stdio.h>
#include<conio.h>
main()
{
i really dont know what next...........
Create a function w/c accepts as input the double numbers x1,x2,x3 and returns to the program the value of the average (x1+x2+x3)/3 as a variable parameter.
#include<stdio.h>
#include<conio.h>
main()
{
i really dont know what next...........
Well at least you figured out where the "post again" button is.
http://www.daniweb.com/forums/thread177519.html
> i really dont know what next...........
Which one of these things seems the most likely to you?
- declare some variables of type double
- print a prompt
- read input
- go to a party
This should be an evolution of your previous homework, so look at that and adapt as much as you can towards this problem.
Create a function w/c accepts as input the double numbers x1,x2,x3 and returns to the program the value of the average (x1+x2+x3)/3 as a variable parameter.
I see you're very good at repeating yourself.
Lets make it simple, post your PREVIOUS assignment and we'll use that as a template for THIS assignment.
Create a function w/c accepts as input the double numbers x1,x2,x3 and returns to the program the value of the average (x1+x2+x3)/3 as a variable parameter.
#include<stdio.h>
#include<conio.h>
main()
{i really dont know what next...........
Look programming is like a game.It has its own set of rules. On coding you can get the same satisfaction and fun as in a game.So try your might and play it.
What you really need to do is:
1>Declare some double variables for you to use.
2>Write a function which takes these double variables as parameters with a double value as a return value.
3>From main program call this function by passing these variables x1,x2,x3 and receiving it in another double variable say result.
Note : Until you play the game you don't know how fun it is so try plunging into it even though its hard ( Sometimes ).
That is like saying ok I want to talk to this guy in French... I know he is French... now what do I do?
Create a function w/c accepts as input the double numbers x1,x2,x3 and returns to the program the value of the average (x1+x2+x3)/3 as a variable parameter.
#include<stdio.h>
#include<conio.h>
main()
{
stdio.h and conio.h are both C header files, not c++. you posted this in the c++ forum -- is that the one you readlly want?
conio.h is a non-standard header file which is not supported by very many compilers, so you might as well just delete that line.
Next you need to declare some doubles double x1, x2, x3, x4, x5;
csurfer pretty much outlined the rest of the things you have to do. If you are still confused then you will probably have to re-study your text book and do all the exercises at the end of each chapter.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.