A Beginner\'s Guide to Fly x Tin PracticeTest C Secure l h moodle2 uncc.edu/mod/
ID: 3799109 • Letter: A
Question
A Beginner's Guide to Fly x Tin PracticeTest C Secure l h moodle2 uncc.edu/mod/quiz/attem pt.php?attem pt 19461358 page 3 Quick Links Academic Support Moodle 2 Summer Moodle 2 Archive FAQs Canvas Login Christopher Yarrison UNC CHARLOTTE ETGR-2122-001-Spring 2017-Technical Programming Home Spring 2017 ETGR-2122-001-Spring 2017-21137 Topic 5 Practice Test QULZ NAVIGATION Question 4 Write a MATLAB script to calculate the area of a circle using a user defined radius r Your script should have "input" and "disp" or 1 2 3 4 Not yet answered "printf" statements. An example of a simple input statement is: variable input Entera: Not graded Finish attempt F Flag question An example of a simple disp statement is: disp(The answer is Time left 0:27:46 An example of an fprintf statement is: print ("The answer is: %5.4g n', x) 3 PM P 2/26/2017Explanation / Answer
# This program is to find the area of circle
# Area of circle = pi*radius^2
piValue = pi; # Defining pi value
radius = input('Enter radius of circle>>>'); # Reading input of radius
fprintf(' Area of circle with radius %f is %f ',radius,piValue*radius*radius); # printing area of circle;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.