Q&A Discussies
Podrían ayudarme con esto??
0 Stemmen
1 AntwoordExplain it...
0 Stemmen
2 AntwoordenPi calculation on Java
-2 Stemmen
1 Antwoordc++
0 Stemmen
1 Antwoord"Char" and "Double"
2 Stemmen
1 Antwoordc++ float vs java float
2 Stemmen
2 AntwoordenJava
0 Stemmen
4 AntwoordenWhy Error?
0 Stemmen
1 AntwoordWhat will be the output and why?
6 Stemmen
4 AntwoordenDistance - c#
0 Stemmen
3 AntwoordenPrime number
2 Stemmen
3 AntwoordenWrite 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 Stem
3 Antwoorden#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 Stem
5 AntwoordenWhat does "Double" mean in C++?
0 Stemmen
1 AntwoordPopulair vandaag
Decorators in python.
2 Votes
Coding for Cybersecurity
1 Votes
Need help
1 Votes
Salut tout le monde
2 Votes
Pointers in c#
1 Votes
Please click me
0 Votes
Hello !
0 Votes