-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update PartitionDay20.cpp #351
base: master
Are you sure you want to change the base?
Conversation
Added few code lines for better readability for the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't comment on another set of changes that I thought I needed to be included, but you can add another print statement of line 22 to ask user to enter the partition size.
@@ -11,6 +11,7 @@ using namespace std; | |||
|
|||
int main(){ | |||
int n; | |||
cout << "Enter the number of values you want to have."<<endl; | |||
cin >> n; | |||
int a[n]; | |||
for(int i = 0; i < n; i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also add a print statement to inform user that he needs to enter a value (integer) each time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey aadikamat,
Thanks for the suggestion. I have done the suggested changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a print statement before line 18 though.
Added few code lines for better readability for the user.