fork download
  1. #include <iostream>
  2. #include <conio.h>
  3.  
  4. using namespace std;
  5.  
  6. int liczba()
  7. {
  8. int nLiczba;
  9.  
  10. if( nLiczba >= 1 )
  11. {
  12. if( nLiczba >= 10 )
  13. {
  14. if( nLiczba >= 100 )
  15. {
  16. cout << "liczba pozostala\n";
  17. }
  18. else
  19. {
  20. cout << "liczba 2cyfrowa\n";
  21. }
  22. }
  23. else
  24. {
  25. cout << "liczba jednocyfrowa\n";
  26. }
  27.  
  28. }
  29. else
  30. {
  31. cout << "liczba ujemna\n";
  32. }
  33. }
  34.  
  35. int main()
  36. {
  37. int nLiczba;
  38.  
  39. for(int i = 0; i < 4; i++)
  40. {
  41. cout << "\nPodaj dowalna liczba ktora program przyporzadkuje do odpowiedniego zbioru: ";
  42. cin >> nLiczba;
  43.  
  44. liczba();
  45. }
  46. }
  47.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
-1
2
10
100
compilation info
prog.cpp:2:19: error: conio.h: No such file or directory
prog.cpp: In function ‘int liczba()’:
prog.cpp:33: warning: control reaches end of non-void function
prog.cpp:10: warning: ‘nLiczba’ is used uninitialized in this function
stdout
Standard output is empty