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
bixtya [17]
3 years ago
13

Write a program that accepts the lengths of three sides of a triangle as an input from the user: A, B, C

Computers and Technology
1 answer:
nasty-shy [4]3 years ago
8 0

Answer:

The program in Python is as follows:

A = int(input("A: "))

B = int(input("B: "))

C = int(input("C: "))

while A<=0 or B <= 0 or C <= 0:

   A = int(input("A: "))

   B = int(input("B: "))

   C = int(input("C: "))

print("Valid inputs")

Explanation:

Get input for A, B and C

<em>A = int(input("A: "))</em>

<em>B = int(input("B: "))</em>

<em>C = int(input("C: "))</em>

The loop is repeated until inputs for A, B and C are above 0

while A<=0 or B <= 0 or C <= 0:

Get input for A, B and C

<em>    A = int(input("A: "))</em>

<em>    B = int(input("B: "))</em>

<em>    C = int(input("C: "))</em>

Print valid inputs when user inputs are correct

print("Valid inputs")

You might be interested in
Consider the following statements: #include #include class Temporary { private: string description; double first; double second;
Anna007 [38]

#include <iostream>  

#include <iomanip>  

using namespace std;  

class temporary  

{  

public:  

void set(string, double, double);  

void print();  

double manipulate ();  

void get (string&, double&, double&);  

void setDescription(string);  

void setFirst(double);  

void setSecond(double);  

string getDescription() const;  

double getFirst () const;  

double getSecond () const;  

temporary(string = "", double = 0.0, double = 0.0);  

private:  

string description;  

double first;  

double second;  

};  

void temporary::set(string a, double dblA, double dblB)  

{  

description = a;  

first = dblA;  

second = dblB;  

}  

void temporary::print()  

{  

cout << "\nDescription: " << left << setw(20) << description << endl <<  

" first: " << fixed << setw(10) << setprecision(2) << first << endl <<  

" second: " << fixed << setw(10) << setprecision(2) << second << endl;  

}  

double temporary::manipulate()  

{  

return first / 3.0 + second / 4.0;  

}  

void temporary::get(string& strDesc, double& dblFirst, double& dblSecond)  

{  

strDesc = description;  

dblFirst = first;  

dblSecond = second;  

}  

temporary::temporary(string d, double a, double b) : description(d), first(a), second(b) {}  

void temporary::setFirst(double dblFirst){first = dblFirst;}  

void temporary::setSecond(double dblSecond){second = dblSecond;}  

void temporary::setDescription(string desc){description = desc;}  

string temporary::getDescription() const {return description;}  

double temporary::getFirst () const{return first;}  

double temporary::getSecond () const {return second;}  

int main()  

{  

cout << "temporary a;";  

temporary a;  

a.print();  

cout << "a.setFirst(3.0): ";  

a.setFirst(3.0);  

a.print();  

cout << "a.setSecond(4.5): ";  

a.setSecond(4.5);  

a.print();  

cout << "a.setDescription(\"Picture Frame\") ";  

a.setDescription("Picture Frame");  

a.print();  

cout << "a.print(): ";  

a.print();  

return 0;  

}

6 0
4 years ago
A school secretary has been asked to prepare a letter
larisa [96]

Answer:

devices. Providing accessibility, resources and connectivity so that learning is ... Supporting learners in using technology for out-of-school learning experi- ... Historically, a learner's educational opportunities have been limited by the ... “When I asked him what the difference was,” recalled Balzer, “he said that now he.

7 0
3 years ago
Write a program where you print this sequence.<br><br> 1<br><br> 3<br><br> 5<br><br> 7<br><br> 9
Gnesinka [82]

init = 1

choice = int(input("How far into the sequence would you like to go to? "))

i = 0

while i < choice:

   print(init)

   init += 2

   i += 1

If you enter 5, you'll get 1,3,5,7,9. You can also go to whatever place in the sequence you want. I wrote my code in python 3.8. Hope this helps

7 0
3 years ago
Prior to the introduction of the Internet and Web, the secure communication of proprietary information in business-to-business e
ss7ja [257]

Answer: Option (B) is correct.

Explanation:

Electronic Data Interchange also known as the EDI is referred to as the the electronic exchange/interchange of business information and data using standardized format, i.e. a process under which an organization sends information and data to another organization electronically instead of using paper. Business organization and several other entities that tends to conduct business electronically known as trading partners.

3 0
3 years ago
Tracerouting is a process that can be used to gather information about a network during which of the seven phases of the informa
Dahasolnce [82]

Answer:

Locate the network range.

Explanation:

5 0
4 years ago
Read 2 more answers
Other questions:
  • April's manager has asked her to provide the financial service manager with the accounts that have not received payment. What sh
    13·2 answers
  • What is the absolute pathname of the YUM configuration file? REMEMBER: An absolute pathname begins with a forward slash
    12·1 answer
  • Why do we need to update database regularly
    15·1 answer
  • Assume inputFile is a Scanner object used to read data from a text file that contains a number of lines. Each line contains an a
    9·1 answer
  • Which of the following is not a metamorphic agent?
    8·2 answers
  • What tag pair is used to create the largest heading?
    10·1 answer
  • What data unit is encapsulated inside a packet?<br> frame<br> datagram<br> segment<br> session
    10·2 answers
  • Which options are available when a business creates a new theme? Check all that apply.
    12·1 answer
  • Adding Objects in Outlook
    10·1 answer
  • Select the processes that help to create a program.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!