Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. int speed_check(int);
  3. int main ()
  4.  
  5. {
  6. int x;
  7. printf ("enter cars speed \n");
  8. scanf ("%d",&x);
  9.  
  10. int speed_check(x);
  11. if (x>=100)
  12. printf ("very fast\n");
  13. else if (x>50 && x<100)
  14. printf("medium speed \n");
  15. else if (x<=50)
  16. printf("very slow ! \n");
  17.  
  18. return 0;
  19. }
  20.  
  21. int speed_check(int x){
  22. for (int i=1;i<=5;i++)
  23. {
  24. printf ("enter cars speed \n");
  25. scanf ("%d",&x);
  26.  
  27. }
  28. return x;
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement