Q&A Discussions
Podrían ayudarme con esto??
0 Votes
1 AnswerExplain it...
0 Votes
2 AnswersPi calculation on Java
-2 Votes
1 Answer"Char" and "Double"
2 Votes
1 Answerc++ float vs java float
2 Votes
2 AnswersWhy Error?
0 Votes
1 AnswerDistance - c#
0 Votes
3 AnswersPrime number
2 Votes
3 AnswersWrite 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 Vote
3 Answers#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 Vote
5 AnswersHot today
HTML
1 Votes
Functions in python
0 Votes
For Mobile app
0 Votes
I need advice
0 Votes
Answer please
0 Votes
I need advice
0 Votes