HELP PLEASE! C++ PROGRAM

can someone help me with this project please? write a program that has 2 different void functions, 2 functions that return numerical values, 1 function that returns a Boolean value, 1 decision structure based on function return value, 1 loop structure based on function return value. the topic can be anything. please help asap!

Here's the basic template. Feel free to change the function names as necessary. You will have to choose a topic yourself and decide what each function should do.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
void function1() // Add any necessary parameters
{
    // Do something
}

void function2() // Add any necessary parameters
{
    // Do something
}

int returnInteger() // Add any necessary parameters
{
    // Do something and return value
}

double returnDouble() // Add any necessary parameters
{
    // Do something and return value
}

bool returnBool() // Add any necessary parameters
{
    // Do something and return value
}

int main()
{
    // Write your code    

    return 0;
}
Make a calculator that does 2 things. Get the factors of a number and does division. The 2 void functions will call the factor function or the division function. 2 functions that return numerical values will be the division and factor function. The boolean function will decide if the user wants to divide or get the factors of a number. The decision structure will check if the user wants to divide or get factors from the boolean function. The loop structure will be getting the factors by dividing the number the user inputted by repeatedly smaller numbers while user input number stays the same. Hint: Use modulo operator to show only the factors from the division done. Your wlecome!!! :)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
void callDivisionFunction()
{
// Call division function
}
void callFactorFunction()
{
// Call factor function
}
int divisionFunction()
{
return dividend / divisor;
}
int factorFunction()
{
/* Divides the input number by itself - 1 but input number stays the same and use the modulo operator to not show every  division result but only the whole numbers of the results */
}
bool divideOrFactors()
{
/* User enter 1 for division and 2 for getting factors */
}
/*
*** Call above functions in main() as necessary!
*/
int main()
{
/* Get user input to decide division or factors. This will be decision structure */

/* Loop structure with factor function inside so it gets divided repeatedly by smaller numbers */
}
Last edited on
@gentleguy
Can you make it clearer?

Now look. The code template in my above post ^^.
Last edited on
thank you all very much!
Topic archived. No new replies allowed.