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
Pavlova-9 [17]
3 years ago
11

Given that a function receives three parameters a, b, c, of type double, write some code, to be included as part of the function

, that checks to see if the value of a is 0; if it is, the code prints the message "no solution for a=0" and returns from the function.
Computers and Technology
1 answer:
never [62]3 years ago
3 0

Answer:

Following are the code in the C Programming Language.

if(a==0) //set if conditional statement

{

//print the following message

printf("no solution for a=0");

}

Explanation:

Here, we define a function and pass three double data type variable i.e., "a", "b", "c" and then we write the following code inside the function.

  • Set the if conditional statement and check that condition is the variable "a" is equal to 0.
  • Then print message through the "printf()" which display on the screen if the given condition is true.
You might be interested in
What is a method whereby new problems are solved based on the solutions from similar cases solved in the past?
mario62 [17]

Answer:

"Case-Based Reasoning" is the answer for the above question.

Explanation:

  • Case-Based Reasoning is a process of decision-making theory in which the new problems were solved based on the previously solved problem.
  • It is used in artificial intelligence and robots. This helps to make any AI and robots to do the work and take decisions on its own.
  • The theory is used to make any computer that behaves like humans. It can take decisions like a human.
  • The above question asked about the method by which the new problem is solved on behalf of the old problem. Hence the answer is "Case-Based Reasoning".
4 0
3 years ago
Declare a structure with a type name: Car containing:
OLga [1]

Answer:

C++ code is given below

Explanation:

#include <iostream>

#include <cctype>

#include <string.h>

#include <cstring>

#include <sstream>

using namespace std;

struct Car {

public:    

char reportingMark[5];    

int carNumber;

string kind;

bool loaded;

string destination;

};

void input(Car *);

void output(Car *);

int main() {

Car *T = new Car;    

input(T);

output(T);    

delete T;    

return 0;

}

void input(Car *T)

{

string str, s;

cout << " Enter the reporting mark as a 5 or less character uppercase string: ";

cin >> str;

for (int i = 0; i < str.length(); i++)

T->reportingMark[i] = toupper(str[i]);

cout << " Enter the car number: ";

cin >> T->carNumber;

cout << " Enter the kind: ";

cin >> T->kind;

cout << " Enter the loaded status as true or false: ";

cin >> s;    

istringstream(s) >> boolalpha >> T->loaded;    

if (T->loaded == true) {

cout << " Enter the destination: ";

cin.ignore();

getline(cin, T->destination);

}

else

T->destination = "NONE";    

}

void output(Car *T)

{

cout << " Reporting Mark: " << T->reportingMark;

cout << " Car Number: " << T->carNumber;    

cout << " Kind: " << T->kind;

cout << " Loaded Status: " << boolalpha << T->loaded;

cout << " Destination: " << T->destination << " ";

}

7 0
3 years ago
Which of the following sentences uses correct punctuation? A. I am a good communicator, and I am a strong team member. B. I comm
adelina 88 [10]
A has a comma then and so that isn't correct
B should be and I am
D should have an and in it
C is correct
7 0
3 years ago
Read 2 more answers
Define the method object inc_num_kids() for PersonInfo. inc_num_kids increments the member data num_kids.Sample output for the g
topjm [15]

Answer:

class PersonInfo:

   def __init__(self):

       self.num_kids = 0

   def inc_num_kids(self):

       self.num_kids += 1

person1 = PersonInfo()

print('Kids:', person1.num_kids)

person1.inc_num_kids()

print('New baby, kids now:', person1.num_kids)

Explanation:

Line 1 of the code, we define the class PersonInfo. Line 3 of the code is the function that will increment the member data num_kids.

4 0
3 years ago
Why do businesses often provide a logo on their web pages?
Nitella [24]
<span>B. They provide viewers with a consistent visual reminder of their company.

This is a prevalent example of branding.</span>
7 0
3 years ago
Other questions:
  • Each computer or device on a network is called a(n) ______.
    7·1 answer
  • Which feature is an interface between the user and the file system of a computer?
    6·2 answers
  • A database is used instead of a spreadsheet when?
    7·1 answer
  • Read the four detective reports and the combined affidavit and warrant for the M57 Patents case. Write a one- to two-page paper
    5·1 answer
  • If you want to insert a table which ribbon should you select
    13·2 answers
  • Three common risk factors for young drivers and how you plan to minimize these factors.
    13·1 answer
  • EASY POINTS what favorate food<br> so easy
    7·2 answers
  • when files on storage are scattered throughout different disks or different parts of a disk, what is it called
    10·1 answer
  • Software piracy is acceptable as it helps us obtain software cheaper or sometimes even for free.
    15·1 answer
  • What would the input, process, outcome and feedback be for a class assignment
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!