//ループが無くなるように変更

#include <stdio.h>

int __fastcall sum(int num)
{
    _asm
    {
        mov eax, ecx
        add eax, 1
        mul ecx
        shr eax,1
    }
}

int main()
{
    printf("%d\n", sum(100));
    return 0;
}