RDV+DIAL chat illimit� dans ta r�g!
no save
Assistance
Achat
News

Forum | programmation
[langage C] comment remplacer[for] par [if]
jamel_theone, le dim. 03 sept. 2006 à 12:57:31
Salut,

tu peux faire ca par exemple


#include <stdio.h>
main()
{

int num;

printf("entrez un chiffre divisible\npar 2 et 3 :\n");
num=1;

if ((num%2 != 0) || (num%3 != 0))
num = getchar() - 48;

printf("Resultat : %d",num);

return 0;
}

Précédentnovice
sept. 06
mamiemando
sept. 06
Suivant
REPONSES
jamel_theone
sept. 06
mamiemando
sept. 06
novice
sept. 06
Char Snipeur
sept. 06
mamiemando
sept. 06
Jeff
sept. 06
novice
sept. 06
lami20j
sept. 06
Char Snipeur
sept. 06
mamiemando
sept. 06
Version Web
Réalisé par RedShift
no save