I need to Write, assemble, and test a program that reads 2 integers n and m from the keyboard and than calculates the sum
of all "divisible by 4" numbers from the range [n,m]. This exercise requires usage of subroutine. Calculate sum in the main procedure;
Check if the number is "divisible by 4" in the subroutine.
nineball_ssj9
0
Newbie Poster
Recommended Answers
Jump to Postyou will learn nothing if you dont try to figuer it out by yourself. But becouse I hate getting the answer, RTFM, look at the mod or modulos fuctions.
Jump to PostSo which bit is bugging you?
Reading in two numbers?
Counting between them?
Calling a function?
Getting the result from a function?
Working out if a number is divisible by 4?If you post some effort showing what you can achieve, then ask a specific question about what …
All 6 Replies
Assemblyn00b
0
Newbie Poster
lineman60
13
Newbie Poster
nineball_ssj9
0
Newbie Poster
Salem
5,138
Posting Sage
lineman60
13
Newbie Poster
nineball_ssj9
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.