Computer programming

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};

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

I must have missed the part of the instructions where they said “get others to take this test for you”.

1 Like