It depends on which action.
Answer:
Written using C++
/*Enter Your Details Here*/
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
//1
float side;
cout<<"Enter the side of a square: ";
//2
cin>>side;
//3
float perimeter = 4 * side;
cout<<"The perimeter is "<<perimeter<<endl;
//4
float area = side *side;
cout<<"The area is "<<area<<endl;
//5
float diagonal = sqrt(2 * side * side);
cout<<"The length of the diagonal is "<<diagonal;
return 0;
}
Explanation:
<em>I've added the full source code as an attachment where I used more comments to </em><em>explain </em><em>difficult line</em>
Answer:
Option b is the correct answer for the above question.
Explanation:
- The mystery function is a recursive function that calls for the two times when the user passes 38 on the argument.
- The first value is 38 and the second value is 2 for which that function is called.
- When the value 38 is passed, then again 2 is passed because of the "mystery (n % 3);" statement.
- This statement holds by the if condition which gives the true when the argument value is greater than 2.
- Hence for the 2 value the if condition will not true and the function is not called again.
- Then the 38/3 and 2/3 are printed whose value is 12 0, but it will print 0 12 because of the recursive function.
- Hence option b is the correct answer while the other is not because other options does not states the output of this program.
Answer:
21
Explanation:
a = 7
b = 7
c = 2
7 is greater than or equal to 7 , so it will return 7 + 7 *2 which is 21
Answer:
download it
Explanation:
because if u upload it will not save .