#include int ary[] = {12, 40, -2, 89, 35, -7, 6};int main(){ int sum = 0; int highest = 0; for (int x = 0; x < 7;="" x++)=""> if (highest <> highest = ary[x]; sum += ary[x]; } printf("Sum is %d\n", sum); printf("Highest value is %d\n", highest);}Use indexing (the [ebx+esi] or [ebx+edi] form). You can have several “dw” values on the same line. Use the “loop” command.
int ary[] = {12, 40, -2, 89, 35, -7, 6};
int main()
{
int sum = 0;
int highest = 0;
for (int x = 0; x < 7;="" x++)="">
if (highest <>
highest = ary[x];
sum += ary[x];
}
printf("Sum is %d\n", sum);
printf("Highest value is %d\n", highest);
Use indexing (the [ebx+esi] or [ebx+edi] form). You can have several “dw” values on the same line. Use the “loop” command.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here