New course! Every coder should learn Generative AI!
Try a free lessonQ&A Discussions
how to display millions
1 Vote
2 AnswersPodrí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
Bits
6 Votes
How to cast in python : 2
2 Votes
Polyalphabetic Cipher
0 Votes
Why didn't I get it?
1 Votes
Adding a photo
1 Votes
Access deny problem
0 Votes
Help
0 Votes