okay guys im really stuck on this and i need help badly. All i know is that i need a loop at the begining to ask for four different marks, these marks have to be between 0-100. the marks are then stored in array and then i do a sum such as SAR EAX,2 to work out the average mark.
If you guys could help that would be great!
Hees some code snippets i have already
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <stdafx.h>
int main (void)
{
int mark1[] = "Enter the Mark for Module:";
char average[] = "The average mark is:";
char format[] = "%d";
int myarray[4];
myarray[0] = test1;
myarray[1] = test2;
myarray[2] = test3;
myarray[3] = test4;
_asm {
mov ecx,4
mov eax,0
mov ebx,0
Loop1: add eax,myarray[ebx]
add ebx,4
loop Loop1
... }
}
Sleep(99999999);
return 0;
}
Thanks,
~Crag