Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Help Please!!! (Beginner Learning)

SilentOSilentO Posts: 7Member
I have just started learning to program using Matlab. I would like to learn how to create the following user inputs into an array,

1) Prompt user to input how many number that array will have
N = input('Enter the number of element the array has: ');

2) Prompt the user to input the number for the first element of the array until the nth of the element? (Prompt must displays which element of the array it is asking for the input)

3) Print out the element of the array.

For Example,

Enter the number of element of the array has: 4

Enter the number for the 1 element of the array: 5
Enter the number for the 2 element of the array: 7
Enter the number for the 3 element of the array: 7
Enter the number for the 4 element of the array: 7


Please help!!!

Comments

Sign In or Register to comment.