Advertisement
kknndd_

GOOGLE ALGORITHM

May 5th, 2021
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. int main() {
  2.  
  3. int min, pocet = 0, vstup;
  4.  
  5. scanf(" %d", &vstup);
  6.  
  7. while(vstup != 0){
  8.  
  9. if(vstup >= 3 && vstup <= 10){
  10. pocet++;
  11. }
  12.  
  13. if(vstup < min){
  14. min = vstup;
  15. }
  16.  
  17. scanf(" %d", &vstup);
  18.  
  19. }
  20.  
  21. printf("Pocet hodnot medzi 3 az 10 vratane.. je : %d\n", pocet);
  22. printf("Najmensie cislo je %d\n", min);
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement