Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1.  
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. int main()
  7. {
  8. float zav_pot; // zavorna pot vozila
  9. float V_zac;
  10. float a;
  11. float g;
  12. float kt;
  13. int pot;
  14. float tr;
  15.  
  16. /** Vpi?i definicije spremenljivk **/
  17. g = 9.8;
  18.  
  19. /** Vnesi vrednosti za za?etno hitrost **/
  20. printf("Vnesi vrednosti za zacetno hitrost");
  21. scanf("%f", &V_zac);
  22.  
  23. /** Vnesi vrednost za koeficient trenja med gumami in asfaltom **/
  24. printf("Vnesi vrednost za koeficient trenja med gumami in asfaltom");
  25. scanf("%f", &kt);
  26. switch (pot) {
  27. case 1:
  28. kt=0.6;
  29. a=kt*g;
  30. break;
  31. case 2:
  32. kt=0.3;
  33. a=kt*g;
  34. break;
  35. default:
  36. }
  37.  
  38.  
  39. /** Vnesi vrednost za reakcijski cas **/
  40. printf("Vnesi vrednost za reakcijski cas");
  41. scanf("%f", &tr);
  42.  
  43.  
  44. /** Izra?unaj zavorno pot **/
  45. zav_pot = V_zac*tr + (V_zac*V_zac)/2*a;
  46.  
  47.  
  48.  
  49. /* Izpis na zaslon*/
  50. printf("Zavorna pot je %f m.\n", zav_pot);
  51. system("PAUSE");
  52. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement