Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. void addArticle(article storage[N], int articleCounter) {
  2. int numberArticle;
  3.  
  4. cout << "Amount of articles to add: ";
  5. cin >> numberArticle;
  6.  
  7. int start = articleCounter;
  8. int end = articleCounter + numberArticle;
  9. if (end > N)
  10. end = N;
  11. articleCounter = end;
  12. for (int i = start; i < end; i++) {
  13. cout << "Article name: " << endl;
  14. cin >> storage[i].articleName;
  15. cout << "Code of article: " << endl;
  16. cin >> storage[i].articleCode;
  17. cout << "Price of article: " << endl;
  18. cin >> storage[i].articlePrice;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement