Sunday, January 16, 2022

Write a program that ask students to enter the marks of quiz of ten students 2.If the average of marks is less than 50% then system should instruct to students to have an extra class.

include irvine32.inc

.386

.stack 4096

Exitprocess proto,dwExitcode:dword

.data

str1 byte "Enter total Average of ten students Here :",0

str2 byte "we advice you to take extra classes",0

str3 byte "you have no need of extra classes",0

marks dword ?

.code

main proc

mov edx,offset str1

call WriteString

call ReadInt 

mov marks,eax

cmp eax,50

jae pass

jb fail

jmp next

pass:

mov edx,offset str3

call WriteString

jmp next

fail:

mov edx,offset str2

call WriteString

next:


invoke Exitprocess,0

main endp

end main 

No comments:

Post a Comment