For more exercises and lessons, visit http://shegertech.blogspot.com/
*/
#include <iostream>
#include <cstdlib>
using namespace std;
int enough (int goal)
{
int n = 1, sum = 1;
while (sum < goal)
sum += ++n;
return n;
}
int main(){
int n2=5;
cout<<enough(n2)<<endl;
system("pause");
return EXIT_SUCCESS;
}