Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab6-124

Snippet info

Language

Cpp

Visibility

public

Author

matho.camara

Created

2018-11-28T08:12:14Z

Updated

2018-12-12T09:16:15Z

#include <iostream>
using namespace std;

int main() {
    int n;
    cout << "Input a number:"<<endl;
    cin>>n;
    
    
    //124 The sequence a1, a2, ..., an consists of zeros and ones.
    for(int i=1;i<=n;i++)
    {
            if(i<n/2)
            cout<<"0"<<endl;
            else
            cout<<"1"<<endl;
    }
    return 0;
}
INFO