Discussions Q&R
Explain it...
0 Vote
2 RéponsesPi calculation on Java
-2 Votes
1 Réponse"Char" and "Double"
2 Votes
1 Réponsec++ float vs java float
2 Votes
2 RéponsesJava
0 Vote
4 RéponsesWhy Error?
0 Vote
1 RéponseDistance - c#
0 Vote
3 RéponsesPrime number
2 Votes
3 RéponsesWrite 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 Réponses#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 RéponsesString
0 Vote
2 RéponsesAujourd'hui en vedette
New code
1 Votes
Clean Code
3 Votes
How would you solve the part of the C# Intermediate code project that requires operator overloading?
0 Votes
Hello Everyone
0 Votes