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
Need help developing code!!
Alexxandr [17]
If you are just starting go on khan academy and go to the computing section and they will start you out on the basics on code devoloping. 
4 0
3 years ago
How do you close a document but keep the word processing program open?
Zielflug [23.3K]

You open a new tab for word then close a other document

7 0
3 years ago
Read 2 more answers
What are the optional parameters when configuring DHCP
stealth61 [152]

Answer:

DHCP is the dynamic host configuration protocol that enable the server for assigning the IP address to the computer. It is basically used to provide automatic IP addresses within the network. It is basically used to configure the default gateway and provide the DNS server data in the device.  

The optional parameter when configuring DHCP are:

  • Sub-net mask
  • Router
  • Domain server
  • Broadcast address
  • Host name
5 0
3 years ago
Exchanging which type of data uses the least bandwidth?
Mariulka [41]

Answer:

Voice data uses less bandwidth during exchanging  

Explanation:

The in-network volume of data been transferred between two network points. The data transfer in the network will be heavy and some time it will less.  

It all depends on the end-user data transfers. If end-user transfer media files such as video or bandwidth will be used heavy. If voice data is used then it uses very less.  

Suppose end-user transfer txt file or XML files some it uses very less bandwidth that also depends on file size transfer.

8 0
3 years ago
On which tab is the function library group located in excel
Neko [114]

The function library group is located in the "formulas" tab

7 0
3 years ago
Read 2 more answers
Other questions:
  • If a gas gosts 3.60 per gallon how much doe sit cost to drive 500 miles in the city
    5·1 answer
  • Windows uses a graphical user interface (GUI), which means: a user can carry out commands by clicking, dragging, or otherwise ma
    6·1 answer
  • The optional feature in a business letter is
    10·1 answer
  • Seth would like to make sure as many interested customers as possible are seeing his business’s website displayed in their searc
    9·1 answer
  • A company accidentally sends a newsletter with a mistyped website address. The address points to a website that has been spoofed
    8·1 answer
  • Digital citizenship is both a right and a {Blank}.
    11·2 answers
  • hich type of denial of service (DoS) attack occurs when a name server receives malicious or misleading data that incorrectly map
    6·1 answer
  • Which of the following file formats cannot be imported using Get &amp; Transform?
    6·1 answer
  • Viruses and Malware Complete the case project on page 82 of the textbook by researching two types of viruses, two types of malwa
    13·1 answer
  • Assume that Publication is the root class of an inheritance tree. You want to form a linked list of different publications in th
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!