Write a function which generates 6 unique random integers between 1 and 49. The name of the function should be Lucky6, it should has no input argument and one output argument (t). The output argument (t) is a 1-by-6 vector including generated integers. Examples: t= 9 13 16 26 30 33 t = 5 12 23 34 37 45 t= 4 8 22 27 41 49

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 23PE
icon
Related questions
Question

Matlab:Please write the codes, I do not want a manual solution

 
Write a function which generates 6 unique random integers between 1 and 49. The name of the function should be Lucky6, it should has no input argument and one output argument (t).
The output argument (f) is a 1-by-6 vector including generated integers.
Examples:
t = 9 13 16 26 30 33
t = 5 12 23 34 37 45
t = 48 22 27 41 49
Transcribed Image Text:Write a function which generates 6 unique random integers between 1 and 49. The name of the function should be Lucky6, it should has no input argument and one output argument (t). The output argument (f) is a 1-by-6 vector including generated integers. Examples: t = 9 13 16 26 30 33 t = 5 12 23 34 37 45 t = 48 22 27 41 49
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Fundamentals of Boolean Algebra and Digital Logics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning