fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int sum(int a, int b);
  5. double sum(double a, double b);
  6. float sum(float a, float b, float c);
  7.  
  8.  
  9.  
  10. int main() {
  11.  
  12. cout<<sum(4,3) << "\n";
  13. cout<<sum(4.4,3.3) << "\n";
  14. cout<<sum(4.4,3.3,2.2) << "\n";
  15.  
  16. }
  17. int sum(int a, int b){
  18. return a+b;
  19. }
  20. double sum(double a, double b){
  21. return a+b;
  22. }
  23. float sum(float a, float b, float c){
  24. return a+b+c;
  25. }
  26.  
  27.  
  28.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
7
7.7
9.9