Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. printf("Please enter the number's base:n");
  2. if(scanf("%d", &baseIn) != 1){
  3. printf("An error occurred!n");
  4. return 0;
  5. }
  6. if(baseIn < 2 || baseIn > 16){
  7. printf("Invalid input basen");
  8. return 0;
  9. }
  10.  
  11. printf("Please enter the desired base:n");
  12. if(scanf("%d", &baseOut) != 1){
  13. printf("An error occurred!n");
  14. return 0;
  15. }
  16. if(baseOut < 2 || baseOut > 16){
  17. printf("Invalid desired basen");
  18. return 0;
  19. }
  20. ...
  21. (More less relevant code)
  22.  
  23. if(scanf("%d", &baseIn) != 1){
  24. printf("An error occurred!n");
  25. return 0;
  26. }
  27.  
  28. if(scanf("%d", &baseIn) <= ){
  29. printf("An error occurred!n");
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement