Preview

Nt1310 Unit 3

Satisfactory Essays
Open Document
Open Document
659 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Nt1310 Unit 3
Michael Brause
CMIS 102-6387
May 30, 2015

Program description: I calculated the usable area in square feet of a house. Assume that the house has a maximum of four rooms, and that each room is rectangular. I wrote pseudo code statements to declare 4 Integers and labeled them homesqft, room1, room2, room3, and room4. Each room will have its length and width to calculate its area.
Analysis:
Test Case #
Input
Expected Output

1
Room1: length=10, width=14
Room2: length=9, width=10
Room3: length=12, width=12

542 sqft

2
Room1: length=10, width=10
Room2: length=11, width=12
Room3: length=11, width=12
Room4: length=13, width=14

546 sqft

3
Room1: length=8, width=10
Room2: length=10, width=12
Room3: length=11, width=14
Room4: length=12, width=14
…show more content…

#include <stdio.h>
2. int main(void) {
3.
4. float homesqft;
5. float room1;
6. float room2;
7. float room3;
8. float room4;
9. float room1_length;
10. float room1_width;
11. float room2_length;
12. float room2_width;
13. float room3_length;
14. float room3_width;
15. float room4_length;
16. float room4_width;
17.
18.
19. room1_length = 10;
20. room1_width = 10;
21. room2_length = 11;
22. room2_width = 12;
23. room3_length = 11;
24. room3_width = 12;
25. room4_length = 13;
26. room4_width = 14;
27.
28. room1 = room1_length * room1_width;
29. room2 = room2_length * room2_width;
30. room3 = room3_length * room3_width;
31. room4 = room4_length * room4_width;
32.
33. homesqft = room1+room2+room3+room4;
34.
35. printf("Square footage is %f", homesqft );
36.
37. return 0;
38. }
39.

Test Case #3 Pseudo code
1. #include <stdio.h>
2. int main(void) {
3.
4. float homesqft;
5. float room1;
6. float room2;
7. float room3;
8. float room4;
9. float room1_length;
10. float room1_width;
11. float room2_length;
12. float room2_width;
13. float room3_length;
14. float room3_width;
15. float room4_length;
16. float room4_width;
17.
18.
19. room1_length = 8;
20. room1_width =


You May Also Find These Documents Helpful

  • Good Essays

    Nt1310 Unit 4

    • 313 Words
    • 2 Pages

    1) Block B in Fig. 6-31 weighs 603 N. The coefficient of static friction between block and table is 0.32; angle θ is 33°; assume that the cord between B and the knot is horizontal. Find the maximum weight of block A for which the system will be stationary.…

    • 313 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Nt1310 Unit 4

    • 775 Words
    • 4 Pages

    Part III PHYSICS HSE II Time:2Hours Max:60 Scores 1. Three identical charges each +q are placed at the corners of an equilateral triangle of side d cm. Calculate the force on a +ive charge +2q at the centroid of the triangle. 2 2.If the earth is supposed to be a metallic sphere,its capacity will be nearly (a) 700pf (b) 700 microfarad (c) 700f (d) 6.4 X10^6 f 1score 3. write the relation between dielectric constant and electric susceptibility. 1score 4. A box encloses an electric dipole consisting of charge 5micro C and -5micro C and of length 10cm. What is the total electric flux through the box? 2scores 5. Find the ratio of the p.d that must be applied across the (1)parallel (2) series combination of two identical capacitors so that the energy stored in the two cases becomes the same. 2 scores 6.(a)…

    • 775 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Nt1310 Unit 5

    • 368 Words
    • 2 Pages

    the ratio of resistors on one side of the bridge is one while the ratio of resistors on the other side is infinity…

    • 368 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Nt1330 Unit 5

    • 800 Words
    • 4 Pages

    26. Also installed in every corridor or hallway associated with a bedroom or if there is no corridor or hallway an area between the bedrooms and the remainder of the house.…

    • 800 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Nt1330 Unit 3

    • 472 Words
    • 2 Pages

    Fill in the blanks in the following table. Then use the table to answer the questions:…

    • 472 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Nt1330 Unit 4

    • 920 Words
    • 4 Pages

    1. Which of the following statements describes part of the process of how a switch…

    • 920 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Nt1310 Unit 7

    • 189 Words
    • 1 Page

    This video addresses an employee taking a service call from an unhappy customer. Answer the following questions:…

    • 189 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    Nt1330 Unit 4

    • 804 Words
    • 4 Pages

    1. What test does startup BIOS perform when you first turn on a computer to verify it can…

    • 804 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Nt1310 Unit 9

    • 392 Words
    • 2 Pages

    A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for general lighting. Appearing as practical electronic components in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet, and infrared wavelengths, with very high brightness.When a light-emitting diode is switched on, electrons are able to recombine with holes within the device, releasing energy in the form of photons. This effect is called electroluminescence, and the color of the light (corresponding to the energy of the photon) is determined by the energy band gap of the semiconductor. An LED is often small in area (less than 1 mm2), and integrated optical components may be used to shape its radiation pattern. LEDs have many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved physical robustness, smaller size, and faster switching. However, LEDs powerful enough for room lighting are relatively expensive, and require more precise current and heat management than compact fluorescent lamp sources of comparable output.Light-emitting diodes are used in applications as diverse as aviation lighting automotive lighting, advertising, general lighting, and traffic signals. LEDs have allowed new text, video displays, and sensors to be developed, while their high switching rates are also useful in advanced communications technology. Infrared LEDs are also used in the remote control units of many commercial products including televisions, DVD players and other domestic appliances. LEDs are also used in seven-segment display.…

    • 392 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Pm3110 Unit 5 Lab Report

    • 343 Words
    • 2 Pages

    Classes are useful for length programs which require large amounts of similar code. Classes can accelerate program development by reducing redundant code, testing, and debugging. Using classes also makes the code easier to read and follow for other programmers.…

    • 343 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Nt1330 Unit 3

    • 606 Words
    • 3 Pages

    What is the primary information system in this area? How is it effective in performing its role? With what systems does it interrelate in receiving data or sending data?…

    • 606 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Nt1310 Unit 1.3

    • 887 Words
    • 4 Pages

    1 3 5 Unit 1 Skin Disorders Skin Disorders Skin lesions 2 4 6 Objectives At the end of the session students will be able to: Explain the disease process and nursing care of following conditions seen in children: Ringworm infections Candidiasis Candidiasis Pediculosis Scabies Herpes Simplex Ringworm infections Ringworm infections Ringworm infections Ringworm infections Tinea or ringworm infection is a fungal infection caused by dermatophytes (class of fungus)…

    • 887 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Comp 122 Week 1 Ilab

    • 662 Words
    • 3 Pages

    3. Design an algorithm in pseudocode to solve the problem. Make sure to include steps to get each input and to report each output.…

    • 662 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    COMP230 Week 4

    • 458 Words
    • 4 Pages

    WScript.Echo "The IP Address in Room " & room & " for computer " & computer & " is " & ipAddress(room-100,computer-1)…

    • 458 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Nt1310 Unit 12

    • 348 Words
    • 2 Pages

    All electrical work from and including motor control centers/panels to and including motors and other electrically operated equipment, which is included in the Specification for Mechanical Work or other work, does not form part of the…

    • 348 Words
    • 2 Pages
    Good Essays