0
Rearrange the code
Rearrange the code to declare two integer variables: a and b, print to the screen the division equation a/b. If b is equal to 0, throw an exception with a 0 value. throw 0; int a: int b; If (b==0) cout << a/b << endl;
17 Réponses
+ 4
int a: int b;
cin>>a>>b;
If (b==0)
throw 0;
cout<<a/b<< endl;
+ 2
int a: int b;?
cout<<a/b<< endl;?
If (b==0)?
throw 0;?
+ 2
answer is
int a; int b;
cin >> a >> b;
if (b == 0)
throw 0;
cout << a / b << endl;
+ 1
int a: int b;
cin>>a>>b;
If (b==0)
throw 0;
cout<<a/b<< endl;
+ 1
int a;int b;
cin>>a>>b;
if(b==0)
throw 0;
cout<<a/b<<endl;
0
............ Have a crack at it
0
why are you asking?
0
Declare the variables. Check if b is zero and if so, throw an exception. Then print out a/b.
Please bear in mind that, if and exception is thrown, the execution halts and passes the control to the parent process. If nothing is thrown, the execution will follow its normal flow.
0
please i need the answer
0
+3
int a: int b;?
cout<<a/b<< endl;?
If (b==0)?
throw 0;?
0
Please type in a code to declare two variables of type int and print their sum using the sum variable.
0
def sayHi():
print ("Hi")
sayHi()
0
rearrange the code to declare the variable name, add it to the session, and then print it to the screen.
Answer:-
Session_start();
$name="Alex";
$_session['name']=$name;
echo $_SESSION['name'];
- 1
thanks all
- 2
Do you have any guess?
- 2
Please, rearrange the code.
- 2
Type in a code to declare variable b and assign a's value to b, and then print their sum to the screen.
int a = 15;
int b =
;
cout << a
b << endl;