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
Write the definition of a function isSenior, that receives an integer parameter and returns true if the parameter's value is gre
ohaa [14]

Answer:

The function definition for this question can be given as:

Function Definition:

bool isSenior(int x )  //function

{  

//function body Or function definition.

//conditional statement

//if statement

if (x >=65)  

{

return true;   //return value true.

}

else  //else statement

{

return false;    //return value false.

}

}

Explanation:

In the above function definition firstly we define a function that isSenior. This function return Boolean value that is true or false in this function we pass the value as the parameter in that function we use the if statement that check the pass value is greater then equal to 65. If the condition is true it return true.else it will return false.

6 0
3 years ago
Algunos de los navegadores que existen son:
AlekseyPX

Answer:

Un navegador que no existe es firechicken.  ja ja  

A browser that does not exist is firechicken.   lol

Explanation:

Un navegador que no existe es firechicken.

¡Espero que esto ayude! :)

¡Marque el más inteligente!

A browser that does not exist is firechicken.

Hope this helps! :)

Please mark brainliest!

5 0
2 years ago
Draw the 2-3 tree that results when you insert the keys E A S Y Q U T I O N in that order into an initially empty tree
mr_godi [17]

Answer:

If its any easy question, answer it yourself.

Explanation:

:)

6 0
2 years ago
Select the correct answer from the drop-down menu.
AnnyKZ [126]

you can right click the target cell or cells and then select the keys to paste the copled data.

3 0
3 years ago
Read 2 more answers
A dietician wants you to write a program that will calculate the number of calories a person can lose by walking at a slow pace
gregori [183]

Answer:

The pseudocode is as follows

1. Input Steps

2. Input Day

3. Miles = Steps/2000

4. Calories = 65 * Miles

5. Print Calories

6. Stop

Explanation:

This line gets the number of steps for the day

1. Input Steps

This line gets the current day

2. Input Day

The line calculates number of miles

3. Miles = Steps/2000

This line calculates the calories lost

4. Calories = 65 * Miles

This line prints the calories lost

5. Print Calories

The pseudocode ends here

6. Stop

6 0
3 years ago
Other questions:
  • The class Date has a single constructor that accepts the integer value: a month- (1 for January through 12 for December), a day
    13·1 answer
  • What is the IEEE standard for the Wi-Fi Protected Access 2 (WPA2) security protocol?
    6·1 answer
  • Design an algorithm for a bounded-buffer monitor in which the buffers (portions) are embedded within the monitor itself."
    10·1 answer
  • Need this!!
    11·2 answers
  • You’re browsing the internet and realize your browser is not responding. Which of the following will allow you to immediately ex
    11·1 answer
  • Which of the following statements is true regarding the e-mails that were collected from Marina and Rita's Cupcakes' key employe
    11·1 answer
  • For questions 3-6, consider the following two-dimensional array:
    11·2 answers
  • You have just received a generic-looking email that is addressed as coming from the administrator of your company. The email say
    8·1 answer
  • Which statement best describes what happens when a computer starts?
    9·1 answer
  • Spreadsheets are sometimes credited with legitimizing the personal computer as a business tool. Why do you think they had such a
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!