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

24th Feb 2019, 2:31 AM
Amina Perazic
6 odpowiedzi
+ 6
CODE OF THE FUNCTION WILL BE void myFunction(int a = 1, int b = 2) { cout << a * b << endl; }
24th Feb 2019, 3:41 AM
MANISH LEKHWANI
MANISH LEKHWANI - avatar
+ 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?
24th Feb 2019, 6:20 AM
Anna
Anna - avatar
+ 2
= *
21st Aug 2019, 1:41 PM
Farhan Nurrahman
Farhan Nurrahman - avatar
+ 1
Anna the symbol for multiplication is "*"
29th Mar 2019, 2:52 PM
MANISH LEKHWANI
MANISH LEKHWANI - avatar
0
void myFunction(int a = 1, int b = 2) { cout << a * b << endl; }
31st Jan 2020, 7:14 AM
swarajya lakshmi B
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?
2nd Apr 2020, 3:15 PM
ahmed belaidi