1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mihalych1998 [28]
3 years ago
10

2.3 Code Practice: Question 2

Computers and Technology
1 answer:
IRISSAK [1]3 years ago
3 0

Answer:

Codes are given below:

Explanation:

Since the language is not specified, I am writing it in c++. I have added comments to explain each line

#include <iostream>

using namespace std;

int main() //Start of main function

{

int feet1, feet2 , inches1, inches2, t_feet, t_inches;  //declaring the variables

cout << "Enter the Feet for the first piece of fabric:"<<endl;

cin >> feet1; //this will take the feet piece1 as an input

cout << "Enter the Inches for the first piece of fabric:"<<endl;

cin >> inches1; //this will take the inches piece1 as an input

cout << "Enter the Feet for the second piece of fabric:"<<endl;

cin >> feet2; //this will take the feet piece2 as an input

cout << "Enter the Inches for the second piece of fabric:"<<endl;

cin >> inches2; //this will take the inches piece2 as an input

t_feet = feet1 + feet2;  //adding the feet

t_inches = inches1 + inches2; //adding the inches

if (t_inches> 11)  //checkimg if the inches are greater than 11

{

   t_feet = t_feet + t_inches/12;  //converting inches to feet that are greater than 12

   t_inches = t_inches%12; //getting the remaining inches after converting them to feet

}

cout <<"The total length: " <<  t_feet <<" feet and" << t_inches <<" inches" << endl;

return 0;

}  //End of main function

You might be interested in
You are investigating a problem between two wireless bridges and you find that signal strength is lower than expected. Which of
son4ous [18]

The most likely problem that led to the signal strength is lower than expected is a D. Wrong antenna type

<h3>What is a Computer Network?</h3>

This refers to the inter-connectivity between wireless bridges to connect a computer system to the world wide web.

Hence, we can see that based on the fact that there is troubleshooting going on about two wireless bridges where the signal strength is lower than expected, the most likely problem that led to the signal strength is lower than expected is a D. Wrong antenna type

Read more about computer networks here:

brainly.com/question/1167985

#SPJ1

8 0
2 years ago
The five types of personal computers are: desktops, laptops, tablets, smartphones, and ________.
motikmotik

Answer:

B. Wearables.

Explanation:

These are tagged to be a category now in the technology as they are seen to make up the fifth type of personal computers in the question above. These are seen to be attached on the body or sometimes embedded to our outfit and also in other cases hung on a part of our body. They are counted to range from fitness trackers to smart watches, headsets etc. They are said to posses microprocessors which aid their functional ability through its use of the internet.

4 0
3 years ago
Steve, an HR manager for IBM, must decide what positions the firm should fill in the next 6 months, which means Steve is current
Katyanochek1 [597]

Answer:

personnel planning

Explanation:

Steve, an HR manager for IBM, must decide what positions the firm should fill in the next 6 months, which means Steve is currently working on personnel planning.

4 0
3 years ago
The residual volume can be measured directly with: Select an answer and submit. For keyboard navigation, use the up/down arrow k
TEA [102]

The residual volume can not be measured directly.

<h3>How is residual volume measured?</h3>

Residual volume is known to be measured by what we call a gas dilution test.

Note that this test often  measures how the concentration of the gases in the container changes.

<h3>What is residual volume?</h3>

This is known to be the Volume of air that is left over after a FORCED EXPIRATION. Note that it is one that cannot be measured by a spirometer.

Hence, The residual volume can not be measured directly.

Learn more about residual volume from

brainly.com/question/12897209

#SPJ1

6 0
2 years ago
a) Write a program that prompts for an integer—let’s call it X—and then finds the sum of X consecutive integers starting at 1. T
Alex73 [517]

Answer:

<u>Solution a</u>

  1. n = int(input("Enter an integer: "))
  2. sum = 0
  3. for x in range(1, n+1):
  4.    sum += x  
  5. print(sum)

<u>Solution b</u>

  1. n = int(input("Enter an integer: "))
  2. for a in range(1, n + 1):
  3.    sum = 0
  4.    for x in range(1, a+1):
  5.        sum += x
  6.    print(sum)

Explanation:

Solution code is written in Python 3.

<u>Solution a</u>

First get the user input for an integer (Line 1).

Create a variable sum and initialize it with zero value (Line 3).

Create a for loop to traverse through the number from 1 to integer n (inclusive) and sum up the current number x (Line 5-6).

Print the sum to terminal (Line 8).

<u>Solution b</u>

Create an outer for loop that traverse through the number from 1 to integer n (inclusive) (Line 3).

Create an inner loop that traverse through the number from 1 to current a value from the outer loop and sum up the current x value (Line 5-6).

Print the sum to terminal (Line 7) and proceed to next iteration and reset the sum to zero (Line 4).

7 0
3 years ago
Other questions:
  • Search engines enable you to
    13·2 answers
  • Pls help me!!!!!!!!!!!!!
    5·2 answers
  • In Windows, the log that stores events from a single application or component rather than events that might have system wide imp
    14·1 answer
  • What is the quickest way to change the format of a table?
    8·1 answer
  • Dany needs to fact check notes she took on 19th
    13·1 answer
  • Seven Features of computer aids design software
    6·1 answer
  • The Python print function
    9·1 answer
  • Karen wants to create a program that will allow the user to input their age. Which of these lines of code should be used?
    11·1 answer
  • Each symbol of an octal number corresponds to 3 bits of a binary number. is it true or false​
    5·1 answer
  • Pls anyone answer this Resource sharing is the need of network because?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!