fork download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. void boro(int, int, int c) {
  5. std::cout << "status : " << (c == 100 ? 1 : 0)
  6. << ", ketinggian : " << std::fixed << std::setprecision(2) << 181.09
  7. << "\n";
  8. }
  9.  
  10. int main() {
  11. // Penggunaan boro(a, b, c)
  12. // Input 37, 100, 100
  13. std::cout << "Input 37, 100, 100 -> ";
  14. boro(37, 100, 100);
  15.  
  16. // Input 37, 100, 200
  17. std::cout << "Input 37, 100, 200 -> ";
  18. boro(37, 100, 200);
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5324KB
stdin
10
10
10
stdout
Input 37, 100, 100 -> status : 1, ketinggian : 181.09
Input 37, 100, 200 -> status : 0, ketinggian : 181.09