while loops with and conditions (repeat until conditions are met)

1 vue (au cours des 30 derniers jours)
Mariam Al Zarouni
Mariam Al Zarouni le 7 Avr 2020
Commenté : Mehmed Saad le 8 Avr 2020
Hello everyone
I'm not the best in coding but i'm trying hard. So basically, i need a code where i can prompt the user to enter any random, real, and positive value only.(number of values must be EVEN).
For example:
the user would enter: 1 4 5
the output would be: re-enter your values as their number must be even
the user would re-enter: 1 4 5 3
and the loop will continue in this case
I hope you got my point and could assist me hence i'm really struggling and haven't got much time
  8 commentaires
Mariam Al Zarouni
Mariam Al Zarouni le 7 Avr 2020
Okay Muhammad,I got my output. Can i just show you what my final output should look like?
Mehmed Saad
Mehmed Saad le 8 Avr 2020
go ahead

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by