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:
M2 = 0.06404
P2 = 2.273
T2 = 5806.45°R
Explanation:
Given that p1 = 10atm, T1 = 1000R, M1 = 0.2.
Therefore from Steam Table, Po1 = (1.028)*(10) = 10.28 atm,
To1 = (1.008)*(1000) = 1008 ºR
R = 1716 ft-lb/slug-ºR cp= 6006 ft-lb/slug-ºR fuel-air ratio (by mass)
F/A =???? = FA slugf/slugaq = 4.5 x 108ft-lb/slugfx FA slugf/sluga = (4.5 x 108)FA ft-lb/sluga
For the air q = cp(To2– To1)
(Exit flow – inlet flow) – choked flow is assumed For M1= 0.2
Table A.3 of steam table gives P/P* = 2.273,
T/T* = 0.2066,
To/To* = 0.1736 To* = To2= To/0.1736 = 1008/0.1736 = 5806.45 ºR Gives q = cp(To* - To) = (6006 ft-lb/sluga-ºR)*(5806.45 – 1008)ºR = 28819500 ft-lb/slugaSetting equal to equation 1 above gives 28819500 ft-lb/sluga= FA*(4.5 x 108) ft-lb/slugaFA =
F/A = 0.06404 slugf/slugaor less to prevent choked flow at the exit
Answer:
They moved fresh water around their vast empire with aqueducts and canals.
Explanation:
Answer:
41.5° C
Explanation:
Given data :
1025 steel
Temperature = 4°C
allowed joint space = 5.4 mm
length of rails = 11.9 m
<u>Determine the highest possible temperature </u>
coefficient of thermal expansion ( ∝ ) = 12.1 * 10^-6 /°C
Applying thermal strain ( Δl / l ) = ∝ * ΔT
( 5.4 * 10^-3 / 11.9 ) = 12.1 * 10^-6 * ( T2 - 4 )
∴ ( T2 - 4 ) = ( 5.4 * 10^-3 / 11.9 ) / 12.1 * 10^-6
hence : T2 = 41.5°C
Answer:
I don't know ask my dad he would
Explanation:
but I can't ask him because he went to get milk and forgot to come back