Advertisement
machkovskitomche

Pozitiven/negativen vnesen broj

Aug 6th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int x;
  7. printf("Vnesete go X:");
  8. scanf("%d",&x);
  9. if(x>=1000){
  10. printf("Preterano pozitiven \n");
  11. }
  12. else if(x>=100 || x<999){
  13. printf("Mnogu pozitiven");
  14. }
  15. else if(x<100 || x>0)
  16. {
  17. printf("Pozitiven\t");
  18. }
  19. else if(x<0 && x>-100)
  20. {
  21. printf("Negativen\t");
  22. }
  23. else if(x<=-100 || x>-999){
  24. printf("Mnogu negativen");
  25. }
  26. else if(x<=-1000){
  27. printf("Preterano negativen");
  28. }
  29. else { printf("NULA"); }
  30. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement