skip to Main Content

enter image description here

I have been coding since 1 hour and suddenly I don’t know what happened and all my code stopped working. When I am running the code it showing me ‘>>’ this arrow in the terminal.

And when I am writing something and entering in it, it again gave me the arrows again and again. Whatever I wrote in front of the arrows it keeps transferring me in the next line. And I think there’s not any problem in my code. Please help somebody

2

Answers


  1. What are you trying to do with "end1". When I put your code in it tells me that end1 has not been declared in the 2nd place you use it.

    This works fine for me

    #include <iostream>
    
    using namespace std;
    
    int main()
    {
        int n, num=1;
        cout<<"How many entries";
        cin>>n;
    
        for(int i=1; i<=n; i++) {
            for(int j=1; j<=i; j++){
                cout<<num;
            }
            cout<<n;
        }
        return 0;
    }
    
    Login or Signup to reply.
  2. you can try reading the documents, and if the problem occurs, try reviewing them.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search