write a program to find the largest of two numbers without
using for,while,switch,if else, conditional operator and do
while using c++ pgmng language
Answer Posted / vishal sharma
double largeone(double a,double b)
{
return(((a+b)/2) + ((a-b)/2));
}
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
What are the three parts of a simple empty class?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
What is encapsulation process?
What is the use of oops?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What is the difference between encapsulation and polymorphism?
What is abstract class in oop?
What is destructor give example?
What is abstraction and encapsulation?
What is overloading and its types?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
Explain the concepts involved in Object Oriented programming.
What is and I oop mean?
What is multilevel inheritance in oop?
What are constructors in oop?