CSC 1250 : CSC Practice Exam Notes

10 views5 pages
15 Mar 2019
School
Course
Professor

Document Summary

*sqrt(x. ^3+5)): write the fprintf statement that produces the following output, where the variables are id(k), hours(k), wages, bonus, gross, wt, and net: Id=5932 hours=35 wages=$ 670. 25 bonus=. 24 gross=$ 777. 49 wt=$ 85. 52 net=$ 691. 97. Id=2814 hours=39 wages=$ 982. 80 bonus=. 25 gross=. 05 wt=. 41 net=. 64. Id=3267 hours=67 wages=$ 566. 15 bonus=$ 90. 58 gross=$ 656. 73 wt=$ 72. 24 net=$ 584. 49. Answer fprintf("id=%d hours=%d wages=$%7. 2f bonus=$%6. 2f gross=$%7. 2f wt=$%6. 2f net=$%7. 2f\n", Id(k),hours(k),wages,bonus,gross,wt,net): write an if statement to determine the largest of three variables a, b, c. Answer if(a==b&&b==c) fprintf( equilateral\n"); elseif(a==b||b==c||a==c) fprintf( isosceles\n"); else fprintf( scalene\n"); end: write an if statement to print whether three unequal variables a, b, c are in increasing order, in decreasing order, or not in order. Answer if(ab&&b>c) fprintf( decreasing order\n"); else fprintf( not in order\n"); end: write the statements to calculate and print the sum of the even integers from 10 to 50 inclusive.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents