Object Oriented Programming Practical 1
Object Oriented Programming Practical 1 Question 1 Write a C++ program to evaluate the following expressions: X=(-b-(b2-4ac))/2a expression.cpp C #include<iostream.h> #include<conio.h> #include<math.h> void main() { clrscr(); int a,b,c,d; cout<<"Enter value of a,b and c"<<endl; cin>>a>>b>>c; d=(-b-(b*b-4*a*c))/(2*a); cout<<"Value= "<<d<<endl; getch(); } #include<iostream.h> #include<conio.h> #include<math.h> void main() { clrscr(); int a,b,c,d; cout<<"Enter value of a,b and c"<<endl;
Object Oriented Programming Practical 1 Read More »
