write a program to calculate the radius for a quadratic
equation use modular programming(function abitraction)hint
use quadratic function
Answer Posted / sureshzzz
#include <stdio.h>
#include <math.h>
int main(){
float r,h;
float volume;
printf( "Enter size
of radius and height of
a cylinder : " );
scanf( "%f
%f" ,&r,&h);
volume = M_PI * r
* r * h;
printf( "\nVolume of
cylinder is :
%.3f" ,volume);
return 0;
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?
What output does this program generate as shown? Why? class A { A() { cout << "A::A()" << endl; } ~A() { cout << "A::~A()" << endl; throw "A::exception"; } }; class B { B() { cout << "B::B()" << endl; throw "B::exception"; } ~B() { cout << "B::~B()"; } }; int main(int, char**) { try { cout << "Entering try...catch block" << endl; A objectA; B objectB; cout << "Exiting try...catch block" << endl; } catch (char* ex) { cout << ex << endl; } return 0; }
Write a (n) algorithm that sorts n distinct integers, ranging in size between 1 and kn inclusive, where k is a constant positive integer. (Hint: Use a kn-element array.)
1+1/2!+1/3!+...+1/n!
write a program that reverses the input number of n.Formulate an equation to come up with the answer.
create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file
Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.
how to write a program that opens a file and display in reverse order?
Implement a command console for changing settings on a particular object. The command console should allow you to enter a string and will return the response (very similar to a terminal session). The commands are as follows: SET propertyname=newvalue will change the target object’s member named “propertyname” to have a value equal to “newvalue”. If the input value is incompatible (i.e. an int being set to a string), print out an appropriate error message. GET propertyname will print out the current value of the target object’s member named “propertyname”. GET * will print out a list of all target object members and their current values. The system should be extensible for future commands and should accept an arbitrary object, such that another developer could insert another object into the system and rely on the command console to get and set the properties correctly.
What output does the following code generate? Why? What output does it generate if you make A::Foo() a pure virtual function? class A { A() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; class B : public A { B() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; int main(int, char**) { A objectA; B objectB; return 0; }
write a program that reads a series of strings and prints only those strings begging with letter "b"
Code for Method of Handling Factorials of Any Size?
how to take time as input in the format (12:02:13) from user so that controls remains between these columns?
Code for Easily Using Hash Table?
Write a simple encryption program using string function which apply the substitution method.