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. }




codesadda.com

Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube