-
Notifications
You must be signed in to change notification settings - Fork 152
Update PartitionDay20.cpp #351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/** | ||
* @author divyakhetan | ||
/* | ||
* @author divyakhetan | ||
* @date 16/1/2019 | ||
*/ | ||
|
||
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Hey aadikamat, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see a print statement before line 18 though. |
||
|
@@ -42,9 +43,11 @@ int main(){ | |
|
||
ans.push_back(part); //for the remaining array | ||
//cout << ans.size(); | ||
cout<<"Your answer is :- "; | ||
for(int i = 0; i < ans.size(); i++){ | ||
for(int j = 0; j < ans[i].size(); j++){ | ||
cout << ans[i][j] << " "; | ||
cout<< ans[i][j] << " "; | ||
|
||
} | ||
cout << endl; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.