[Ajuda] alguma funcao pra calculadora
#7

pawn Код:
#define potencia(%0,%1) floatround(floatpower(%0,%1))
#define somar(%0,%1) (%0)+(%1)
#define subtrair(%0,%1) (%0)-(%1)
#define multiplicar(%0,%1) (%0)*(%1)
#define dividir(%0,%1) (%0)/(%1)
#define numeropar(%0) !(%0 % 2)
#define numeroimpar(%0) (%0 % 2)
ex:
pawn Код:
new
    sStringFrm[128]; //altere as cells
format(sStringFrm, sizeof(sStringFrm), "10*1000 = %d", multiplicar(10,1000));
SendClientMessage(playerid, -1, sStringFrm);
pawn Код:
new
    sStringFrm[128], //altere as cells
    a = 10,
    b = 1000;
format(sStringFrm, sizeof(sStringFrm), "%i * %i = %d", a, b, multiplicar(10,1000));
SendClientMessage(playerid, -1, sStringFrm);
Reply


Messages In This Thread
alguma funcao pra calculadora - by rogerioexper - 28.07.2013, 17:44
Re: alguma funcao pra calculadora - by P1c4550 - 28.07.2013, 18:02
Re: alguma funcao pra calculadora - by DarknessPT - 28.07.2013, 18:04
Re: alguma funcao pra calculadora - by BarbaNegra - 28.07.2013, 18:10
Re: alguma funcao pra calculadora - by DarknessPT - 28.07.2013, 18:21
Re: alguma funcao pra calculadora - by rogerioexper - 28.07.2013, 18:23
Re: alguma funcao pra calculadora - by DarknessPT - 28.07.2013, 18:29
Re: alguma funcao pra calculadora - by rogerioexper - 28.07.2013, 19:25

Forum Jump:


Users browsing this thread: 2 Guest(s)