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.

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.

LANGUAGE: C++

CHALLENGE:

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.

SOLUTION:


if( a==0.0 ) cout<<"no solution for a=0"<<endl;

Add comment