Here's the question to my work.

The sequence of triangle numbers is generated by adding the natural numbers. Hence, the 7th triangle number would be `1 + 2 + 3 + 4 + 5 + 6 + 7 = 28`. The first ten terms would be: `1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...`

Let us list the factors of the first seven triangle numbers:

```
1: 1

3: 1,3

6: 1,2,3,6

10: 1,2,5,10

15: 1,3,5,15

21: 1,3,7,21

28: 1,2,4,7,14,28

```

We can see that 28 is the first triangle number to have over five divisors. What is the value of the first triangle number to have over one hundred divisors?

and this this is my code. I am having trouble with the error handling.The only valid inputs are numbers. If I enter anything other than a number, i want it to respond "ERROR" or something like that.

```
int main()
{

    int div=0,sum=0,num,i=1,count=0,a;
    cout<<"Enter the number of divisors"<< endl;
    cin>>a;
    while(div<=a) { 
        div=0;
        sum=sum+i;
        for(int j=1;j<=sum;j++)
            if (sum%j==0)
                div++;
        chk++;
        i++;
    }
    cout<<"Value of first triangle number is "<<sum<<endl;
    cout<<"Value of triangle number is "<<count<<endl;
    return 0;
}

```

also i did my program before my pseudocode and the flowchart,so if any1 can help me guide through my pseudocode n flowchart,it would be appreciated.thank you. =)