HackerRank C++ Input and Output



Read 3 numbers from stdin and print their sum to stdout.



  1. #include <cmath>
  2. #include <cstdio>
  3. #include <vector>
  4. #include <iostream>
  5. #include <algorithm>
  6. using namespace std;
  7. int main()
  8. {
  9. long double a,b,c,sum=0;
  10. cin>>a>>b>>c;
  11. sum=a+b+c;
  12. cout<<sum;
  13. return 0;
  14. }

download android app