write a program to calculate the radius for a quadratic
equation use modular programming(function abitraction)hint
use quadratic function



write a program to calculate the radius for a quadratic equation use modular programming(function ..

Answer / 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

More C++ Code Interview Questions

using friend function find the maximum number from given two numbers from two different classes.write all necessary functions and constructor for the classes.

1 Answers   TCS,


Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?

0 Answers   Wipro,


A Binary no. is given, we hav to find it's decimal equivalent.

2 Answers   Microsoft,


Subsets Write an algorithm that prints out all the subsets of 3 elements of a set of n elements. The elements of the set are stored in a list that is the input to the algorithm. (Since it is a set, you may assume all elements in the list are distinct.)

1 Answers   CSC, Qatar University,


Faster Computers Suppose you have a computer that requires 1 minute to solve problem instances of size 1000. What instance sizes can be run in 1 minute if you buy a new computer that runs 1000 times faster than the old one, assuming the following time complexities T(n) for our algorithm? (a) T(n) = O(n). (b) T(n) = O(n3). (c) T(n) = O(10n).

1 Answers   Qatar University,






Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?

0 Answers   ASD Lab, Qatar University, UNV,


Write an algorithm that receives a string and reverses it.

2 Answers  


write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used

0 Answers   Jomo Kenyatta University,


what is virtual constroctor ? give an exam for it?-(parimal dhimmar)

2 Answers  


what is the difference between int &r and int& r

3 Answers  


Definition of priority queue was given. We have to implement the priority queue using array of pointers with the priorities given in the range 1..n. The array could be accessed using the variable top. The list corresponding to the array elements contains the items having the priority as the array index. Adding an item would require changing the value of top if it has higher priority than top. Extracting an item would require deleting the first element from the corresponding queue. The following class was given: class PriorityQueue { int *Data[100]; int top; public: void put(int item, int priority); // inserts the item with the given priority. int get(int priority); // extract the element with the given priority. int count(); // returns the total elements in the priority queue. int isEmpty(); // check whether the priority queue is empty or not. }; We had to implement all these class functions.

0 Answers   Nagarro, Wollega University,


can you please write a program for deadlock that can detect deadlock and to prevent deadlock.

0 Answers  


Categories