i need answers to some Computer Programming Questions
A. Given the main function below, write the function triple that returns the number incremented by 3 times the value of the number and a function double that will print out the double of the number (the function does not return the value)
int main()
{
int num;
cout << "Enter an integer : ";
cin >> num;
cout << "\nThe 3 times incremented value of " << num
<< " is: " << triple (num) << endl; // call of triple
cout << "\nThe double of the value : ";
double (num); //call of function cube
return 0;
}
B. Given the following array declaration, write the code segment to find the minimum and the average of the values in the array.
int Array [ ] = {2, 4, 6, 8, 10, 12};
I must have missed the part of the instructions where they said “get others to take this test for you”.
1 Like