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]
2 years ago
10

2.3 Code Practice: Question 2

Computers and Technology
1 answer:
IRISSAK [1]2 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
Which extension is appropriate for Word document templates?
expeople1 [14]
The answer to this question is A
8 0
2 years ago
Read 2 more answers
Explain why database management systems are used in hospitals? Discuss
Sergeeva-Olga [200]

The reason why database management systems are used in hospitals is because the use of Healthcare databases aids in terms of diagnosis and treatment, handle documentation and billing, and others.

<h3>What is a database management system in healthcare?</h3>

A database management system (DBMS) is known to be a type of software that has been developed to help people to form and keep databases.

It is one that helps to lower the risk of errors associated with medical operations and management. It reduces  paperwork and staff and also improves  performance.

Learn more about database management from

brainly.com/question/24027204

8 0
2 years ago
grow a sentence frame a small and simple sentence. then expand it. Expand this sentence -I am a gril​
AlekseyPX

Answer:

I am a young lady.

Explanation:

simply sentence or expand more:

  • I am a young lady in my teens. ​
  • I am a young woman in her twenties. ​
  • I am a twenty-year-old lady who is just starting off in life. ​
  • I am a twenty-year-old woman who is just getting her feet wet in the world. ​
6 0
3 years ago
Read 2 more answers
What must be done before using ArrayLists?<br><br> (This is Java Programming btw)
Viktor [21]

Answer:

to create an ArrayList , you declare an Arraylist variable and call the ArrayList constructor to instantiate and ArrayList object and assign it to the variable

5 0
3 years ago
PLEASE HELP ASAP
Phantasy [73]
Reliable sources state that Americans whom use social media have a better overall sense of community. Social media is beneficial to the overall mental stability of Americans when it comes to community
5 0
2 years ago
Other questions:
  • _____ is two or more connected computers.
    8·1 answer
  • Mention five features of word processing application​
    10·1 answer
  • The most popular way for hackers to take over hosts today is ________.
    15·2 answers
  • What is the term for an element on a Webpage that contains data and procedures for how that item will react when activated
    14·1 answer
  • True or False?
    8·1 answer
  • Jack is writing a paragraph for a school assignment. He proofreads his paper and notices that he used the word, "then" many time
    15·2 answers
  • Explain why a single 500 kg block of granite weathers much more slowly than 100 chunks of granite weighing 5 kg each.
    15·2 answers
  • Why 3 phase motors so effective?
    5·1 answer
  • Which of the following is input devices? (a)Scanner (b) Keyboard (c) Both a and b (d) Plotter​
    5·1 answer
  • Please read !!!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!