Guest User

Untitled

a guest
Feb 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. cout<<"Enter the number of soldiers: ";
  2. cin>>a;
  3. if (a>=10 && a<=50)
  4. {
  5. cout<<"Enter the number of k-th soldier to be removed: ";
  6. cin>>b;
  7. if (b>=2 && b<=10)
  8. {
  9. for (c=1; c<=a; c++)
  10. ex.Enqueue(c);
  11. }
  12. else
  13. {
  14. cerr<<"Error: Input must be in between 2 to 10.";
  15. cin.get(); cin.get();
  16. }
  17. }
  18. else
  19. {
  20. cout<<"Error: Input must be in between 10 to 50.";
  21. cin.get(); cin.get();
  22. }
Add Comment
Please, Sign In to add comment