Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HelloWorld{
- public static void main(String []args){
- System.out.println("Hello World");
- }
- int Somme=0, SommePoids= 0;
- //calculer somme des poids
- for(int i=0,i<tailleTableauPoids;i++)
- SommePoids=SommePoids+TableauPoids[i];
- // paroucrir la nouvelle matrice M
- for(int i=0,i<N,i++){
- for(int j=0,j<N,j++){
- // verifier si diagonal
- if(i!=j){
- // traitment dans l'ancinne matrice T
- for(int k=0,k<M,k++){
- if(T[i,k]>T[j,K])
- Somme = Somme + TableauPoids[k];
- else
- Somme = Somme + 0;
- }
- M[i,j]=Somme/SommePoids;
- }
- else M[i,j]=0; // diagonal remplier par zero pour evité les probleme dans langage C
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement