Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

Include Irvine32.

inc
.data
question db "How many subjects", 0
num dd ?
sign db "Your Symbol is A",0
sign1 db "Your Symbol is B",0
sign2 db "Your Symbol is C",0
sign3 db "Failed ",0
question2 db "Enter percent", 0
num1 dd ?
counter dd 0
.code
main PROC
mov edx, offset question
invoke WriteString
call crlf
invoke ReadInt
mov num, eax
mov ecx, num
mov eax, 0
LoopSiya:
mov edx, offset question2
invoke WriteString
call crlf
invoke ReadInt
mov num, eax
add counter, eax
Loop LoopSiya
mov eax, counter
cdq
idiv num
cmp num,75
jge If_Siya
cmp num, 60
jge If_Luve
cmp num, 50
jge If_Ongie
jl If_Me
mov ecx, 0
If_Siya:
mov edx, offset sign
invoke WriteString
call crlf
jmp LoopS
If_Luve:
mov edx, offset sign1
invoke WriteString
call crlf
jmp LoopS
If_Ongie:
mov edx, offset sign2
invoke WriteString
call crlf
jmp LoopS
If_Me:

mov edx, offset sign3


invoke WriteString
call crlf
LoopS:
exit
main ENDP
end main

You might also like