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
4.8 code practice question 2 edhesive
Vladimir [108]

Answer:

for y in range(88, 43, -4):

   print(y, end=" ")

Explanation:

yw

6 0
2 years ago
Which of the following lines correctly defines a String variable
lidiya [134]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is C i.e. String s = "apluse";

The rule or syntax of declaring string in any programming language is given below:

String variable-name = "yourString";

For declaring string variable, first, you write "String" that is a keyword of a programming languages for declaring string variables, such as int before the variable name for declaring integer variable. Then, you need to write a meaningful name of the string as a variable. After string variable name, you need to put the equal operator and then write the string in double quotation("") marks and after that put the instruction terminator that is ";".

So, according to this syntax, option C is correct.

While other options are not correct because:

In option a, string is not encapsulated in double quotation. Option B does not have varaible type such as String and Option E does not have variable name and its value also. So, only option C is correct and all other except C are incorrect.

3 0
2 years ago
I need help please and thank you
Evgen [1.6K]

Answer:

Explanation: For "BEST way to handle the situation," try Option 1, because it would possibly help them or make the Technical Support Representative do less work.

For "WORST way to handle the situation," Option 4 would be the best because you're basically just hanging up on the person.

5 0
3 years ago
Why are laptop employment of computer popular these days​
steposvetlana [31]

Answer:

Because due to pandemic all the offices and employment sector are closed physically and to make their work smoothly people are preferring virtual platforms with the concept of work from home .

I hope it is helpful and mark me as brainlest and follow me plllzzz♥️♥️

7 0
3 years ago
The blank one is a close up of what logo?
fredd [130]

Answer:

These are company brand logo

Explanation:

These are company brand logo, and you will find it on all products of that company, plus generally you will find them on each page of their website as well as mobile application.

6 0
3 years ago
Other questions:
  • The layout button is located in the ____ group on the home tab?
    14·1 answer
  • Typohunting is registering a domain name that is similar to a trademark or domain name but that is slightly misspelled in hopes
    5·1 answer
  • ⭐️⭐️⭐️ what Network is larger in size? MAN or WAN? Thank you ⭐️⭐️⭐️
    5·1 answer
  • Which is a value of the Scrum Manifesto?
    9·1 answer
  • Press the _______ key to move to the next cell in a row.
    5·1 answer
  • Which attack intercepts communications between a web browser and the underlying computer?
    10·1 answer
  • What happens in the process represented by the flowchart ?
    14·1 answer
  • Write a program that accepts two numbers R and H, from Command Argument List (feed to the main method). R is the radius of the w
    11·1 answer
  • Question 5 of 25
    10·2 answers
  • Greenpeace used "Mister Splashy Pants" to:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!