- 1
c++
Type in a code to declare a function myFunction, taking two int parameters with default values 1 and 2, respectively, and printing their multiplication to the screen. void myFunction(int a = 1, int b _ 2) { cout << a _ b << endl; }
6 odpowiedzi
+ 6
CODE OF THE FUNCTION WILL BE
void myFunction(int a = 1, int b = 2)
{
cout << a * b << endl;
}
+ 5
What might be the symbol missing in "int b _ 2", given that "int a = 1" is already specified in the same line?
What is the symbol for multiplication?
+ 2
=
*
+ 1
Anna the symbol for multiplication is "*"
0
void myFunction(int a = 1, int b
=
2)
{
cout << a
*
b << endl;
}
0
What might be the symbol missing in "int b _ 2", given that "int a = 1" is already specified in the same line?
What is the symbol for multiplication?