Pagina 1 di 2

pkè non và?

Inviato: 20 apr 2008, 16:45
da Giggione
#include <nanodesktop.h>
#include <stdio.h>
#include <stdlib.h>
int wind;
int ndMain ()
{
int MP;
int exit;
char buffer[maxdim];
char x;
int z;
int i;
ndInitSystem ();
MP=ndLP_CreateWindow (10, 10, 400, 200, "Menu' Principale", COLOR_WHITE, COLOR_BLUE,
COLOR_BLACK, COLOR_WHITE, 0);
ndLP_MaximizeWindow (MP);
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "1 Definisci fantacalcio *;");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "2 Cassa ;");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "3 Scontri ;");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "4 Crediti ;");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "5 Esci .");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " ");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "\t Nota: Le impostazioni segnati con *");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " vanno chiamate solo al primo avvio!");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " ");
ndHAL_Delay ( 5.0 );
do{
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " Scegli in numero dell'opzione da eseguire..");
exit=0;
i=0;
while (!exit)
{
fread (&x, -1, -1, stdin);
if (x!='\n')
{
buffer =x; // Salva il carattere ricevuto nel buffer
i++;
}
else // Hai premuto ENTER. Esci
{
exit=1; // Esce dal ciclo while
ndCloseSystemKeyboard ();
}
}
sscanf(&buffer, "%d", &z);
if (z==1)
{ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " 1 Definisci fantacalcio *.");
ndHAL_Delay ( 2.0 );
wind=ndLP_CreateWindow (50, 50, 400, 200, " Definisci fantacalcio *", COLOR_WHITE, COLOR_BLUE,
COLOR_BLACK, COLOR_WHITE, 0);
ndLP_MaximizeWindow (wind);
def();
}
if (z==2)
{ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " 2 Cassa .");
ndHAL_Delay ( 2.0 );
wind=ndLP_CreateWindow (50, 50, 300, 200, " Cassa", COLOR_WHITE, COLOR_BLUE,
COLOR_BLACK, COLOR_WHITE, 0);
ndLP_MaximizeWindow (wind);
cassa();
}
if(z==3)
{ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " 3 Scontri .");
ndHAL_Delay ( 2.0 );
wind=ndLP_CreateWindow (50, 50, 400, 200, " Scontri", COLOR_WHITE, COLOR_BLUE,
COLOR_BLACK, COLOR_WHITE, 0);
ndLP_MaximizeWindow (wind);
scontri();
}
if(z==4)
{ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " 4 Crediti .");
ndHAL_Delay ( 2.0 );
wind=ndLP_CreateWindow (50, 50, 400, 200, " Crediti", COLOR_WHITE, COLOR_BLUE,
COLOR_BLACK, COLOR_WHITE, 0);
ndLP_MaximizeWindow (wind);
crediti();
}
if(z==5)
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " 5 Esci .");
if (z>5)
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " ERRORE.!");
}while(z!=5);
}

Re: pkè non và?

Inviato: 20 apr 2008, 16:46
da Furbetta91
:roll:

Re: pkè non và?

Inviato: 20 apr 2008, 16:47
da Giggione
void def();
void cassa();
void scontri();
void crediti();
.
.
.
.
.
.
void def()
{
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, "Questa funzione è in elaborazione attendi la prossima relase ;)");
ndHAL_Delay ( 5.0 );
ndLP_DestroyWindow (wind);
}
void cassa()
{
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, "Questa funzione è in elaborazione attendi la prossima relase ;)");
ndHAL_Delay ( 5.0 );
ndLP_DestroyWindow (wind);

}
void scontri()
{
int c,i,exit,s=0,f=0;
float z;
char buffer[maxdim];
char x;

ndWS_PrintLn (wind , COLOR_WHITE, RENDER, " Squadra numero 1");
for (c=0;c<11;c++)
{
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, " Inserisci il voto n %d: ",(c+1));
exit=0;
i=0;

while (!exit)
{
fread (&x, -1, -1, stdin);
if (x!='\n')
{
buffer =x; // Salva il carattere ricevuto nel buffer
i++;
}
else // Hai premuto ENTER. Esci
{
exit=1; // Esce dal ciclo while
ndCloseSystemKeyboard ();
}

}
sscanf(&buffer, "%f", &z);

ndWS_PrintLn (wind , COLOR_WHITE, RENDER, " %f",z);
s=s+z;
}
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, " Squadra numero 2");
for (c=0;c<11;c++)
{
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, " Inserisci il voto n %d: ",(c+1));
exit=0;
i=0;

while (!exit)
{
fread (&x, -1, -1, stdin);
if (x!='\n')
{
buffer =x; // Salva il carattere ricevuto nel buffer
i++;
}
else // Hai premuto ENTER. Esci
{
exit=1; // Esce dal ciclo while
ndCloseSystemKeyboard ();
}

}
sscanf(&buffer, "%f", &z);

ndWS_PrintLn (wind , COLOR_WHITE, RENDER, " %f",z);
f=f+z;
}
if(s>f)
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, " Vince la squadra numero 1");
else
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, " Vince la squadra numero 2" );

}
void crediti()
{
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, "Copiright Aspx.");
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, "Tutti i diritti riservati.");
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, " ");
ndWS_PrintLn (wind , COLOR_WHITE, RENDER, "Uno speciale ringraziamente per la realizzazione di questo programma va a Pegasus 2000 non ci sarei mai riuscito senza la sua assistenza ");
ndHAL_Delay ( 7.0 );
ndLP_DestroyWindow (wind);
}


qst sono le relative funzioni

Re: pkè non và?

Inviato: 20 apr 2008, 16:49
da Furbetta91
:roll: ... :lol: :lol: :lol:

Re: pkè non và?

Inviato: 20 apr 2008, 17:13
da .::giggino92::.
:shock: :roll: :arrow: :-|

Re: pkè non và?

Inviato: 20 apr 2008, 17:19
da Furbetta91
Furbetta91 ha scritto::roll: ... :lol: :lol: :lol:

Re: pkè non và?

Inviato: 20 apr 2008, 19:43
da Antonella92
:shock: :shock: ma ke è???

Re: pkè non và?

Inviato: 21 apr 2008, 00:43
da fred55
Giggione ha scritto:#include <nanodesktop.h>
#include <stdio.h>
#include <stdlib.h>
int wind;
int ndMain ()
{
int MP;
int exit;
char buffer[maxdim];
char x;
int z;
int i;
ndInitSystem ();
MP=ndLP_CreateWindow (10, 10, 400, 200, "Menu' Principale", COLOR_WHITE, COLOR_BLUE,
COLOR_BLACK, COLOR_WHITE, 0);
ndLP_MaximizeWindow (MP);
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "1 Definisci fantacalcio *;");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "2 Cassa ;");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "3 Scontri ;");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "4 Crediti ;");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "5 Esci .");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " ");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, "\t Nota: Le impostazioni segnati con *");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " vanno chiamate solo al primo avvio!");
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " ");
ndHAL_Delay ( 5.0 );
do{
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " Scegli in numero dell'opzione da eseguire..");
exit=0;
i=0;
while (!exit)
{
fread (&x, -1, -1, stdin);
if (x!='\n')
{
buffer =x; // Salva il carattere ricevuto nel buffer
i++;
}
else // Hai premuto ENTER. Esci
{
exit=1; // Esce dal ciclo while
ndCloseSystemKeyboard ();
}
}
sscanf(&buffer, "%d", &z);
if (z==1)
{ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " 1 Definisci fantacalcio *.");
ndHAL_Delay ( 2.0 );
wind=ndLP_CreateWindow (50, 50, 400, 200, " Definisci fantacalcio *", COLOR_WHITE, COLOR_BLUE,
COLOR_BLACK, COLOR_WHITE, 0);
ndLP_MaximizeWindow (wind);
def();
}
if (z==2)
{ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " 2 Cassa .");
ndHAL_Delay ( 2.0 );
wind=ndLP_CreateWindow (50, 50, 300, 200, " Cassa", COLOR_WHITE, COLOR_BLUE,
COLOR_BLACK, COLOR_WHITE, 0);
ndLP_MaximizeWindow (wind);
cassa();
}
if(z==3)
{ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " 3 Scontri .");
ndHAL_Delay ( 2.0 );
wind=ndLP_CreateWindow (50, 50, 400, 200, " Scontri", COLOR_WHITE, COLOR_BLUE,
COLOR_BLACK, COLOR_WHITE, 0);
ndLP_MaximizeWindow (wind);
scontri();
}
if(z==4)
{ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " 4 Crediti .");
ndHAL_Delay ( 2.0 );
wind=ndLP_CreateWindow (50, 50, 400, 200, " Crediti", COLOR_WHITE, COLOR_BLUE,
COLOR_BLACK, COLOR_WHITE, 0);
ndLP_MaximizeWindow (wind);
crediti();
}
if(z==5)
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " 5 Esci .");
if (z>5)
ndWS_PrintLn (MP , COLOR_WHITE, RENDER, " ERRORE.!");
}while(z!=5);
}

xkè è disabilitato l html nel forum :???:

Re: pkè non và?

Inviato: 21 apr 2008, 00:49
da a regin e rio de gescal
mitt a primm e vutt.....vir ch part :lol: :lol:

Re: pkè non và?

Inviato: 21 apr 2008, 00:57
da FREDDY KRUGHER
:94: :94: :94:

Re: pkè non và?

Inviato: 05 mag 2008, 20:38
da Giggione
romantico88 ha scritto:
Antonella92 ha scritto::shock: :shock: ma ke è???
programma in html

sapientoni non è affatto html.....
è linguaggio C
volevo sapere il pkè non funziona

Re: pkè non và?

Inviato: 05 mag 2008, 20:39
da Giggione
a regin e rio de gescal ha scritto:mitt a primm e vutt.....vir ch part :lol: :lol:

:shock: :shock: :shock:

Re: pkè non và?

Inviato: 05 mag 2008, 20:41
da a regin e rio de gescal
:shock: aropp tutt stu tiemp t ven a ment???ric a vrità,nun putiv rurmì!!!! :lol:

Re: pkè non và?

Inviato: 05 mag 2008, 20:41
da FREDDY KRUGHER
:lol: :lol: :lol:

Re: pkè non và?

Inviato: 05 mag 2008, 20:43
da a regin e rio de gescal
canematto ha scritto:regina la stai avendo con me ??
cu giggione!!!! :grin:

Re: pkè non và?

Inviato: 05 mag 2008, 20:43
da the madness
:lol: :lol:

Re: pkè non và?

Inviato: 05 mag 2008, 20:51
da Dj Mr Hahn
:roll: :roll: :roll:

Re: pkè non và?

Inviato: 05 mag 2008, 22:11
da Chester-Shinoda
;-) :roll:

Re: pkè non và?

Inviato: 05 mag 2008, 22:12
da Jarabe
Al posto dell tergreigeriugefibgnwuoi..c vuole snfdsirjoe ;-)

Re: pkè non và?

Inviato: 05 mag 2008, 22:12
da tonyx-92
xk si strunz :?:

Re: pkè non và?

Inviato: 06 mag 2008, 16:00
da Giggione
a regin e rio de gescal ha scritto: :shock: aropp tutt stu tiemp t ven a ment???ric a vrità,nun putiv rurmì!!!! :lol:

eh...a vist?

Re: pkè non và?

Inviato: 06 mag 2008, 16:00
da Giggione
tonyx-92 ha scritto:xk si strunz :?:

:???: :???: senti da ke pulpito arriva la predica

Re: pkè non và?

Inviato: 06 mag 2008, 16:01
da tonyx-92
o pulp o tien a kap e tavl a rummenk

Re: pkè non và?

Inviato: 06 mag 2008, 16:10
da FREDDY KRUGHER
:lol: :lol: :lol:

Re: pkè non và?

Inviato: 06 mag 2008, 16:15
da Jarabe
Ma vatt a ciriell