Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

1. Change the C code to calculate the product of two integers as opposed to the sum of two integers

1. Change the C code to calculate the product of two integers as opposed

to the sum of two integers. 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 product of two integers.
3. Change the C code to calculate the quotient (e.g. a/b) of two floats (e.g. 2.3/1.5).Hint: Use float variable types as opposed to integers. What happens if the denominator is 0.0? Support yourexperimentation with screen captures of executing the new code
4. Prepare a new test table with at least 3 distinct test cases listing input and expected output forthe quotient of two floats.

1CMIS 102 Hands-On LabWeek 2OverviewThis hands-on lab allows you to follow and experiment with the critical steps of developing a programincluding the program description, analysis, test plan, design, and implementation with C code.Program DescriptionThis program will sum two integer numbers to yield a third integer number. Once the calculations aremade the results of all the numbers will be printed to the output screen.AnalysisWe will use sequential programming statements.We will define 3 integer numbers: a, b, c.c will store the sum of a and b.Test PlanTo understand this program the following input numbers could be used for testing:a = 10b = 20c = a + b = 10 + 20 = 30In table format the following results are expected:Run #Input aInput bExpected Output1102030200031243564804-30-90-120Design using Pseudocode// This program will sum two integer numbers to yield a third integer number.// It will also divide two float numbers to yield a third float number.// Declare variablesDeclare a,b,c as Integer// Set values of IntegersSet a=10Set b=20Set c= a + b// Print a, b, cPrint a,b,c
Background image of page 1
2C CodeThe following is the C Code that will compile in execute in the online compilers.// C code// This program will sum two integer numbers to yield a third integer number.// Developer: Faculty CMIS102// Date: Jan 31, XXXX#include <stdio.h>int main (){/* variable definition: */int a, b, c;/* variable initialization */a = 10;b = 20;c = a + b;printf(“Integers (a,b) and sum (c) are : %d,%d,%d \n”, a,b,c);return 0;}Results from running the programming at ideone.com:
Background image of page 2

Show 

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"