martedì 10 febbraio 2009
Massimo Funzione
#include int massimo(int a,int b){ if(a>b){ return a; } else{ return b; }}main(){ int c; int d; int max; printf("inserire numero"); scanf("%d",&c); printf("inserire un altro numero"); scanf("%d",&d); while(d!=999){ printf("inserire un altro numero"); scanf("%d",&d); } max=massimo(c,d); printf("il numero massimo è:%d\n",max);}
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento