martedì 17 febbraio 2009

Isodd-Funzione

#include
int isodd(int a){
int b;
b= a/2;
if(a==b*2){
b=0;
return b;
}
else{
b=1;
return b;
}
}
main(){
int x;
int y;
if(x!=999){
printf("inserire un numero intero");
scanf("%d",&x);
y=isodd(x);
printf("%d",y);
}
}

Nessun commento:

Posta un commento