Qui peut m'aider a corriger un program C
Résolu
khaled47
Messages postés
12
Date d'inscription
Statut
Membre
Dernière intervention
-
dragondark Messages postés 465 Date d'inscription Statut Membre Dernière intervention -
dragondark Messages postés 465 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
QUI PEUT M'AIDER A CORRIGER UN PROGRAM C (COMPILATION) & merci d'avance ^^
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
main()
{int a,b,c,x,choix1,choix2=0;
printf("1_permutation de 2 variable \n 2_permutation de 3 variable");
scanf("%d",&choix1);
if (choix1==1)
{
while((choix2)!=3)
{
printf("1_methode variable supplimentaire\n2_permutation par affichage\n_3quiter");
scanf("%d",&choix2);
printf("a=%d" ,a);scanf("%d",&a);
printf("b=%d" ,b);scanf("%d",&b);
switch (choix2):
{ case 1 :
x=a;
a=b;
b=a;
printf("a=%d b=%d",a,b);
break;
case 2:
printf("b=%d a=%d",a;b);
break;
case 3 : exit(0); break;
default :
printf("erreur de saisi");
}
{printf("1_methode variable supplimentaire\n2_permutation par affichage\n_3quiter");
scanf("%d",&choix2);
}}
else if ((choix2)==2)
{
while((choix2)!=3)
{
printf("1_methode de variable supplimentaire\n2_methode d'affichage\n3_quit");
scanf("%d",& choix2);
printf("a=%d" ,a);scanf("%d",&a);
printf("b=%d" ,b);scanf("%d",&b);
printf("c=%d" ,c);scanf("%d",&c);
switch(choix2):
{ case 1 :
x=a;
a=b;
b=c;
c=x;
printf("a=%d\n b=%d \n c=%d",a,b,c);
break;
case 2 :
printf("a=%d\n b=%d \n c=%d",b,c,a);
break;
case 3 : exit(0);break;
default :
printf("erreur de saisi");
}
}
}
else
printf("choix invalide!!!!!!!!!!!!!!!!!!!!!!!!");
getch();
}
QUI PEUT M'AIDER A CORRIGER UN PROGRAM C (COMPILATION) & merci d'avance ^^
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
main()
{int a,b,c,x,choix1,choix2=0;
printf("1_permutation de 2 variable \n 2_permutation de 3 variable");
scanf("%d",&choix1);
if (choix1==1)
{
while((choix2)!=3)
{
printf("1_methode variable supplimentaire\n2_permutation par affichage\n_3quiter");
scanf("%d",&choix2);
printf("a=%d" ,a);scanf("%d",&a);
printf("b=%d" ,b);scanf("%d",&b);
switch (choix2):
{ case 1 :
x=a;
a=b;
b=a;
printf("a=%d b=%d",a,b);
break;
case 2:
printf("b=%d a=%d",a;b);
break;
case 3 : exit(0); break;
default :
printf("erreur de saisi");
}
{printf("1_methode variable supplimentaire\n2_permutation par affichage\n_3quiter");
scanf("%d",&choix2);
}}
else if ((choix2)==2)
{
while((choix2)!=3)
{
printf("1_methode de variable supplimentaire\n2_methode d'affichage\n3_quit");
scanf("%d",& choix2);
printf("a=%d" ,a);scanf("%d",&a);
printf("b=%d" ,b);scanf("%d",&b);
printf("c=%d" ,c);scanf("%d",&c);
switch(choix2):
{ case 1 :
x=a;
a=b;
b=c;
c=x;
printf("a=%d\n b=%d \n c=%d",a,b,c);
break;
case 2 :
printf("a=%d\n b=%d \n c=%d",b,c,a);
break;
case 3 : exit(0);break;
default :
printf("erreur de saisi");
}
}
}
else
printf("choix invalide!!!!!!!!!!!!!!!!!!!!!!!!");
getch();
}
A voir également:
- Qui peut m'aider a corriger un program C
- Corriger un message whatsapp - Guide
- Program files - Forum Windows
- Device harddiskvolume3 program files bonjour mdnsnsp.dll - Forum Virus
- Atheros client installation program - Forum Logiciels
- The following component(s) are required to run this program microsoft visual c++ runtime ✓ - Forum Programmation