### Free Educational Resources

• > CMIS 102 WEEK 3 HANDS-ON LAB
+

# CMIS 102 WEEK 3 HANDS-ON LAB

##### Rating:
(1)
• (0)
• (0)
• (0)
• (0)
• (1)
Author: Joyce Buda
##### Description:

http://theperfecthomework.com/cmis-102-week-3-hands-on-lab/

Learning Exercises for you to complete
1. Change the C code to calculate the perimeter of a triangle. Support your experimentation with ascreen capture of executing the new code
2. Prepare a new test table with at least 3 distinct test cases listing input and expected output  perimeter of a triangle.
3. What is this line of code doing? scanf("%f", &height);How would you change this line if you wanted to input an Integer as opposed to a float?
4. What are the values of f and g after executing the following C?
#include <
int main(void) { int i,j;
float f,g; i = 5;
j = 2; f = 3.0;
f = f + j / i;
g = (f + j )/i;
printf("value of f,g is %f,%fn", f,g);
return 0;}
Describe specifically, and in your own words, why are the values of f and g different?
Support your experimentation with a screen capture of executing the code.

(more)
##### Try a College Course Free

Sophia’s self-paced online courses are a great way to save time and money as you earn credits eligible for transfer to over 2,000 colleges and universities.*

No credit card required

26 Sophia partners guarantee credit transfer.

226 Institutions have accepted or given pre-approval for credit transfer.

* The American Council on Education's College Credit Recommendation Service (ACE Credit®) has evaluated and recommended college credit for 21 of Sophia’s online courses. More than 2,000 colleges and universities consider ACE CREDIT recommendations in determining the applicability to their course and degree programs.

Tutorial