Input and Output

Sort by

recency

|

750 Discussions

|

  • + 0 comments
    //To take variable number of inputs. //use EOF to stop the loop (widnows: 'ctrl + x' enter)
    
    include <iostream>
    using namespace std;
    
    int main() { int i = 0; int sum = 0;
    
    while (cin >> i) {
        sum += i;
    }
    
    cout << sum << endl;
    
    return 0;
    } 
    
  • + 0 comments

    That’s a great place to start learning coding and enhance your knowledge on it Fun in Match

  • + 0 comments

    wow

  • + 1 comment

    include

    using namespace std;
    int main()
    {
    int a,b,c,s=0;
    cout<<"enter the number ;
    cin>>a>>b>>c;
    s=a+b+c;cout<<"sum is ="<<s;
    }
    
  • + 0 comments

    Great resource for getting started with C++! A solid first step in learning C++ coding challenges. Ekbet login id and password