Answer:
See below in the explanation section the Matlab script to solve the problem.
Explanation:
prompt='enter the first weight w1: ';
w1=input(prompt);
wd1=double(w1);
prompt='enter the second weight w2: ';
w2=input(prompt);
wd2=double(w2);
prompt='enter the third weight w3: ';
w3=input(prompt);
wd3=double(w3);
prompt='enter the fourth weight w4: ';
w4=input(prompt);
wd4=double(w4);
prompt='enter the first weight w5: ';
w5=input(prompt);
wd5=double(w5);
x=[wd1 wd2 wd3 wd4 wd5]
format short
Answer: Steel is an alloy of iron with typically a few percent of carbon to improve its strength and fracture resistance compared to iron. Many other additional elements may be present or added. Stainless steels that are corrosion and oxidation resistant need typically an additional 11% chromium.
Explanation:
Answer:
a) 0.697*10³ lb.in
b) 6.352 ksi
Explanation:
a)
For cylinder AB:
Let Length of AB = 12 in


For cylinder BC:
Let Length of BC = 18 in




b) Maximum shear stress in BC

Maximum shear stress in AB

Answer:
The tax on this property is
dollars
Explanation:
Given
Tax on per $100 is $2.50
Tax on every $1 is
dollars
Tax on property of value $150,000 is
dollars
The tax on this property is
dollars
Answer:
Program that removes all spaces from the given input
Explanation:
// An efficient Java program to remove all spaces
// from a string
class GFG
{
// Function to remove all spaces
// from a given string
static int removeSpaces(char []str)
{
// To keep track of non-space character count
int count = 0;
// Traverse the given string.
// If current character
// is not space, then place
// it at index 'count++'
for (int i = 0; i<str.length; i++)
if (str[i] != ' ')
str[count++] = str[i]; // here count is
// incremented
return count;
}
// Driver code
public static void main(String[] args)
{
char str[] = "g eeks for ge eeks ".toCharArray();
int i = removeSpaces(str);
System.out.println(String.valueOf(str).subSequence(0, i));
}
}