Project #105455 - CMIS 102 Hands-On Lab 3

Part 1

Learning Exercises for you to complete

1. Change the C code to calculate the perimeter of a triangle. Support your experimentation with a screen capture of executing the new code


2. Prepare a new test table with at least 3 distinct test cases listing input and expected output for the 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 <stdio.h>

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,%f\n", 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.



Submit a neatly organized word (or PDF) document that demonstrates you successfully executed this lab on your machine using an online compiler. You should provide a screen capture of the resulting output.

Also, provide the answers, associated screen captures, C Code and descriptions of your successful completion of learning exercises 1, 2, 3 and 4.

The answers to the learning exercises, screen captures, C code and descriptions can be included in the same neatly organized document you prepared as you ran this lab. Note the code can be embedded in the word document. However; be sure all code compiles and runs perfectly before submitting the document.

Submit your document no later than the due date listed in the syllabus or calendar.



Part 2 – Create your own Loop application


Create your own unique While-End or (For End) repetition C code. You decide the theme. Be sure to provide an overview of what your repetition structure is doing. Please keep the design simple for this exercise. Just a few lines of code is all that is needed for this response. This should be code you wrote for an application that is interesting to you. In other words, make it your own and have fun with it.


Provide the C code and a screen capture showing the results of testing your code in an online compiler. Be sure to test your code with several test cases and show your test case table.



Submit your word or PDF file to your assignments folder no later than the due date.




File :

Subject Computer
Due By (Pacific Time) 01/27/2016 08:00 am
Report DMCA

Chat Now!

out of 1971 reviews

Chat Now!

out of 766 reviews

Chat Now!

out of 1164 reviews

Chat Now!

out of 721 reviews

Chat Now!

out of 1600 reviews

Chat Now!

out of 770 reviews

Chat Now!

out of 766 reviews

Chat Now!

out of 680 reviews
All Rights Reserved. Copyright by - Copyright Policy