Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1.  
  2. double value = -60;
  3.  
  4. for (int i =0 ; i < 14; i++)
  5. {
  6. mt1[i].value= value;
  7. mt1[i].cpt=0;
  8. value=value+ 10;
  9.  
  10. }
  11.  
  12.  
  13. for (int i =0 ; i < 14; i++)
  14. {
  15. if (counter <= mt1[0].value)
  16. mt1[0].cpt+=1;
  17. else if (counter >= mt1[13].value)
  18. mt1[14].cpt+=1;
  19. else if (counter >= mt1[i].value && counter <= mt1[i + 1].value )
  20. mt1[i].cpt +=1;
  21. else
  22. mt1[i+1].cpt +=1;
  23. affiche = mt1[i].value * 0.001 ;
  24. printf("%.2lf %d \n",affiche,mt1[i].cpt);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement