For my class i have to write a program. It must have:
- function named check () with three arguments; 1st argument is an integer number, 2nd is a double precision number and last is a double precision number.
- they want it just display values of the data passed to the function when it is called.
If i can get some help with this question id very much appreciate it :)
This is what i have thus far:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
usingnamespace std;
void check (int number)
{
cout << "Please type in a number: " << endl;
cin >> number;
cout << number;
system ("pause");
}
your right just keep passing the rest of the numbers throught, then call your function in main(), but what do you mean as double precision, setting the variable as a double , or setting the precision of the double to 2 decimal places. I thing if your include #include <iomapi> or something like that you can use a function call setPrecison(), google it.