Answer:
The code to this question as follows:
Code:
if(x < y) //if block that check value of x less then value of y
{
if(x<z) // inner if block that check value of x less then value of z
{
min = x; //assign value of x in min variable
}
else // inner else block when condition is false
{
min = z; //assign value of z in min variable
}
}
else //outer else block
{
if(y<z) //if block to check value of variable y is less then value of z
{
min = y; //assign value of y in min variable
}
else //else block
{
min = z; //assign value of z in min variable
}
}
Explanation:
In the given question it is defined, that an integer variable " x, y,z, and min" is declared, in which variable "x,y, and z" value is defined, and the variable is used to assign a big value.
- To check the biggest value we use the if-else statement in which, and if block check value of x is less than then the value of y if this condition is true so, inside this another if block declares, that will check if the value of x is less then z. if this is true, it will assign the value of x in min variable else it will assign the value of z in min.
- In the outer else part, another conditional block has used, that checks if the value of y is less than then the value of z if it is true, it assigns the value of y in min else it will assign the value of z in min.
Answer:
The following statement is true.
Explanation:
BSoD(Blue Screen of Death) is not any hazardous or dangerous thing which protects the system's hardware. It appears when the operating system sense your system is overheating or something will harm your system then, everything stops and Blue Screen of Death will appear.
If your BIOS is outdated then your BSoD will not work properly due to some incompatibility.
Answer:
x = 29:73;
x_even = x(2:2:end);
Explanation:
In order to create a vector in Matlab you can use colon notation:
x = j:k
where <em>j</em> is 29 and <em>k</em> is 73 in your case:
x = 29:73
Then you can extract the even numbers by extracting the numbers with even index (2,4,6,etc.) of your vector:
x_even = x(2:2:end);
In the line of code above, we define <em>x_even</em> as all the elements of x with even index from index 2 till the end index of your vector, and an increment of 2 in the index: 2,4,6,etc.
If you want the odd numbers, just use the odd indices of your vector:
x_odd = x(1:2:end);
where <em>x_odd</em> contains all the elements of <em>x</em> with odd index from index 1 till the end index, and an increment of 2: 1,3,5,etc.
B) each person gets to contribute in their own unique way
Answer:
#here is code in python.
#read number of shares
num_share = int(input("Enter number of shares:"))
#read purchase price
buy_p = float(input("Enter purchase price:"))
#read sell price
sell_p = float(input("Enter sale price:"))
#total buying cost
buy_cost=buy_p*1.03*num_share
#total selling cost
sell_cost=sell_p*0.97*num_share
#if net profit
if(sell_cost>buy_cost):
print("After the transaction, you made " +str(sell_cost-buy_cost)+ " dollars.")
#if net loss
else:
print("After the transaction, you lost " +str(buy_cost-sell_cost)+ " dollars.")
Explanation:
Read the total number of shares from user.Then read buying price of a share and selling price of a share.Then calculate total buying cost including commission.Calculate total selling cost excluding the commission.If total buying cost is greater than total selling cost the print the profit else print the loss in the transaction.
Output:
Enter number of shares:10
Enter purchase price:10
Enter sale price:10
After the transaction, you lost 6.0 dollars.