I dont know the answer to this
Answer:
Code is given below:
Explanation:
.data
str1: .space 20
str2: .space 20
msg1:.asciiz "Please enter string (max 20 characters): "
msg2: .asciiz "\n Please enter string (max 20 chars): "
msg3:.asciiz "\nSAME"
msg4:.asciiz "\nNOT SAME"
.text
.globl main
main:
li $v0,4 #loads msg1
la $a0,msg1
syscall
li $v0,8
la $a0,str1
addi $a1,$zero,20
syscall #got string to manipulate
li $v0,4 #loads msg2
la $a0,msg2
syscall
li $v0,8
la $a0,str2
addi $a1,$zero,20
syscall #got string
la $a0,str1 #pass address of str1
la $a1,str2 #pass address of str2
jal methodComp #call methodComp
beq $v0,$zero,ok #check result
li $v0,4
la $a0,msg4
syscall
j exit
ok:
li $v0,4
la $a0,msg3
syscall
exit:
li $v0,10
syscall
methodComp:
add $t0,$zero,$zero
add $t1,$zero,$a0
add $t2,$zero,$a1
loop:
lb $t3($t1) #load a byte from each string
lb $t4($t2)
beqz $t3,checkt2 #str1 end
beqz $t4,missmatch
slt $t5,$t3,$t4 #compare two bytes
bnez $t5,missmatch
addi $t1,$t1,1 #t1 points to the next byte of str1
addi $t2,$t2,1
j loop
missmatch:
addi $v0,$zero,1
j endfunction
checkt2:
bnez $t4,missmatch
add $v0,$zero,$zero
endfunction:
jr $ra
Answer:
P = 4.745 kips
Explanation:
Given
ΔL = 0.01 in
E = 29000 KSI
D = 1/2 in
LAB = LAC = L = 12 in
We get the area as follows
A = π*D²/4 = π*(1/2 in)²/4 = (π/16) in²
Then we use the formula
ΔL = P*L/(A*E)
For AB:
ΔL(AB) = PAB*L/(A*E) = PAB*12 in/((π/16) in²*29*10⁶ PSI)
⇒ ΔL(AB) = (2.107*10⁻⁶ in/lbf)*PAB
For AC:
ΔL(AC) = PAC*L/(A*E) = PAC*12 in/((π/16) in²*29*10⁶ PSI)
⇒ ΔL(AC) = (2.107*10⁻⁶ in/lbf)*PAC
Now, we use the condition
ΔL = ΔL(AB)ₓ + ΔL(AC)ₓ = ΔL(AB)*Cos 30° + ΔL(AC)*Cos 30° = 0.01 in
⇒ ΔL = (2.107*10⁻⁶ in/lbf)*PAB*Cos 30°+(2.107*10⁻⁶ in/lbf)*PAC*Cos 30°= 0.01 in
Knowing that PAB*Cos 30°+PAC*Cos 30° = P
we have
(2.107*10⁻⁶ in/lbf)*P = 0.01 in
⇒ P = 4745.11 lb = 4.745 kips
The pic shown can help to understand the question.
Answer:
Time =t2=58.4 h
Explanation:
Since temperature is the same hence using condition
x^2/Dt=constant
where t is the time as temperature so D also remains constant
hence
x^2/t=constant
2.3^2/11=5.3^2/t2
time=t^2=58.4 h