Trying to get name to print in the display
15 views (last 30 days)
Show older comments
Code:
Name = input('Enter your name: ','s');
fprintf('Hello, %13.0s, this program will let you mix two primary colors\n yellow, red, and blue together to make a secondary color.\n\n',Name);
color1=input('Enter the first color to mix: ','s');
fprintf('\n')
color2=input('Okay, %13.0s, now enter the second color to mix: ','s');
fprintf('\n')
Output:
Enter your name: steve
Hello, , this program will let you mix two primary colors
yellow, red, and blue together to make a secondary color.
Enter the first color to mix: red
Okay, %13.0s, now enter the second color to mix: brown
0 Comments
Answers (1)
See Also
Categories
Find more on Author Block Masks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!