Discussões Q&A
Explain it...
0 Voto
2 RespostasPi calculation on Java
-2 Votos
1 Respostac++
0 Voto
1 Resposta"Char" and "Double"
2 Votos
1 Respostac++ float vs java float
2 Votos
2 RespostasJava
0 Voto
4 RespostasWhy Error?
0 Voto
1 RespostaDistance - c#
0 Voto
3 RespostasPrime number
2 Votos
3 RespostasWrite and test a program that solves quadratic equations. A
quadratic equation is an equation of the form ax2+ bx + c =0 ,where a,b and c are given coefficient and x is the unknown The coefficients are real number inputs ,so they should be declared of type float or double Since quadratic equations typically have two solutions ,use x1 and x2 for the solutions to be output These should be declared of type double to avoid inaccuracies from round-off error
-1 Voto
3 Respostas#include <iostream>
using namespace std;
class employee
int main()
{
private:
double salary;
public:
void getsalary(double sal)
{
salary=sal;
}
void display()
{
cout<<"the salary:"<<salary;
}
};
void main ()
{
employee programmer;
employee manager;
manager.getsalary (60000.0);
programmer.getsalary(40000.0);
manager.display();
programmer.display();
return 0;
}
1 Voto
5 RespostasPopular hoje
I need help to solve this
0 Votes
Engineer Cloud
0 Votes
Project
0 Votes
Lua?
1 Votes
How to add comment in python?
0 Votes
How do we code calculator
0 Votes