All pastes #795055 Raw Edit

Unnamed

public cpp v1 · immutable
#795055 ·published 2007-11-23 17:12 UTC
rendered paste body
#include <stdio.h>struct node{    int szam;    node *next=NULL;};int maxker(node *first){    asm    {            pusha            push ebp            mov ebp,esp            mov ecx,[esp+8]            xor eax,eax            cmp ecx,0            je  vege            mov eax, [ecx]        loop_eleje:            add ecx,4            mov ecx,[ecx]            cmp ecx,0            je vege            cmp word eax,[ecx]            jge csere            jmp loop_eleje        csere:            mov eax,[ecx]        vege:            pop ebp            popa    }}int main(){    printf("Add meg, hány számot akarsz megadni!\r\n");    int db; scanf("%d",db);    node *first, *temp;    temp=first;    int i;    for(i=1, i<=db, i++)    {            temp=(node *)malloc(sizeof(struct node));            scanf("%d",temp->szam);            temp=temp->next;    }    printf("%s",maxker(first));    return 0;}