fork download
  1. //this is my code but it isnt taking the line as input i really dont know why?
  2. #include <iostream>
  3. #include <iomanip>
  4. #include <limits>
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9. double d = 4.0;
  10. string s = "HackerRank ";
  11. double b;
  12. string s2;
  13. cin>>b;
  14. getline(cin, s2, '\n');
  15. cout<<d+b<<"\n";
  16. cout<<s<<s2<<"\n";
  17. }
Success #stdin #stdout 0s 3472KB
stdin
4.0 umang mahant!
stdout
8
HackerRank  umang mahant!