Search Here

CS201 Assignment No 2 Solution - Spring 2019

CS201 Assignment No 2 Solution - Spring 2019

Write a menu based system in C++ that will take input from user for the following menu. You will create an array. And perform the following operations on the array.




Press 1 To Enter Values In Array.

Press 2 To Read Array Elements.

Press 3 To Show Array Elements In Reverse Order.

Press 4 To Show Array Elements Which Are Multiples Of 3.

Press 5 To Show Sum Of All The Elements.

Press 6 To Exit.

           

Solution Instructions:

è Use switch statement for the menu based system.

èYou have to use pointers for option 2, 3, 4, 5.

èYou can use user defined functions for each of the task mentioned above to manage your code.



To Enter Values In Array
getValues();
To Read Array Elements
displayArray();
To Show Array Elements In Reverse Order
reverseArray();
To Show Array Elements Which Are Multiples Of 3.
multipleOf3();
To Show Sum Of All The Elements
sumOfElements();



If the user chooses any option other than 1, for the first time, when array is empty, so the user will get a message

Array is empty, first enter data in array" as shown in the sample output.



To get solution please comment.

Post a Comment

12 Comments

  1. Replies
    1. Solution will be posted as soon... keep visiting

      Delete
  2. Replies
    1. Solution will be posted as soon... keep visiting

      Delete
  3. Replies
    1. Mail me at ad.hassan69@gmail.com to get unique code. Remember we have different solution for this assignment for each student, you have to spent only 100 Rs to get code. Thanks for ur interest.

      Delete
  4. agr kese k pas file me hai to sand karo plz

    ReplyDelete
  5. solution ab da bhii da

    ReplyDelete
  6. Solution....if possible fr u

    ReplyDelete
    Replies
    1. Mail me at ad.hassan69@gmail.com to get unique code. Remember we have different solution for this assignment for each student, you have to spent only 100 Rs to get code. Thanks for ur interest.

      Delete