pe_il être plus amélioré ?

pe_il être plus amélioré ? - C++ - Programmation

Marsh Posté le 08-02-2006 à 10:25:24    

peu _il etre plus amélioré
 
sujet:
IL FAUT TROUVé les valeur qui sont a la fois maximume dans leurs ligne et minimum dans leur colonne (dans un tab à 2D) :
 
#include<stdio.h>
main() {
int l,c,i,j,h=0,t[10][10],max,min,j_sup,ya_pas=0,rep;
 
do{
 
printf("combien de ligne , et combien de colonne\n" );  scanf("%d%d",&l,&c);
while(l>10 || c>10)
{ printf("le nombre de ligne et de colonne doivent etre <= 10\n" ); scanf("%d%d",&l,&c); }
 
printf("\tREMPLISSAGE DE LA MATRICE :\n\n" );
 
for(i=0;i<l;i++)
 for(j=0;j<c;j++)
 { h++; printf("donnez la %d eme valeur\t",h);   scanf("%d",&t[i][j]); }
 
for(i=0;i<l;i++)
{
 for(j=0;j<c;j++)
 if(j==0 || t[i][j]>max)   { max=t[i][j];  j_sup=j; }
 
 for(h=0;h<l;h++)
 if(h==0 || t[h][j_sup]<min)  min=t[h][j_sup];
 
 if(min==max)
 {
 ya_pas=ya_pas+1;
 printf("\nle nombre %d est un point_col\n",max);
 printf("sa position dans la matrice est ( ligne: %d , colonne: %d )",i,j_sup);
 }
}
if(ya_pas==0)  printf("\n y a pas de points_cols dans cette matrice" );
 
printf("\n\ntapez 0 pour recmmencer avec une autre matrice ,ou un autre nombre pour arréter\t" );
scanf("%d",&rep);     ya_pas=0;      h=0;
 
}while(rep==0);
 
}

Reply

Marsh Posté le 08-02-2006 à 10:25:24   

Reply

Marsh Posté le 08-02-2006 à 10:37:21    

C'est quoi la question, sinon?


---------------
Can't buy what I want because it's free -
Reply

Marsh Posté le 08-02-2006 à 10:40:03    

utilises las balises codes aussi parce que c'est pas agréable, surtout si tu veux qu'on voit si on peut faire plus efficace :)

Reply

Marsh Posté le 08-02-2006 à 10:41:22    

Chandernagor [:aloy]


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box, and replicate and expand beyond their wildest dreams by throwing away the limits imposed by overbearing genetic r
Reply

Marsh Posté le 08-02-2006 à 10:42:23    

Puis de toute manière on fait pas les résolutions d'exercices, on n'aime pas le spam, et fais un effort de français si tu veux qu'on te lise.


---------------
Can't buy what I want because it's free -
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed