write a program that calculate the volume of cylinder after
user enters radius and height and show the algorithm used
Answer / evangelist sammy gicheha
# include<iostream.h>
//using namespace std;
# define PI 3.142;
int main ()
{
int Rad,Height;
double area;
cout<<"Enter the radius;";
cin>>Rad;
cout<<"Enter the Height;";
cin>>Height;
area = 3.142 * Rad * Rad * Height;
cout<<"Radius="<<Rad<<endl;
cout<<"Height="<<Height<<endl;
cout<<"The Area of the circle is"<<area<<"\n";
return 0;
}
Is This Answer Correct ? | 5 Yes | 4 No |
A string of charaters were given. Find the highest occurance of a character and display that character. eg.: INPUT: AEGBCNAVNEETGUPTAEDAGPE OUTPUT: E
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; }
Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)
can we declare an object of a class in another class?(assume both class as public classes)
write a program that can LOCATE and INSERT elements in array using c++ programming languages.
#include<iostream.h> //main() //{ class A { friend class B; public: void read(); }; class B { public : int a,b; }; void A::read() { cout<<"welcome"; } main() { A x; B y; y.read(); } In the above program......, as B is a friend of A B can have access to all members,i cant access y.read . could you please tell me the reason and what would i code to execute this program?
Write a function- oriented to convert the input dollar(s) into its equivalent peso. Assume that one dollar is equivalent to 51.60
Write code for the multiplication of COMPLEX numbers?
swap prog
PROBLEM #8 The cashier at the counter of a Super Store, Mr. Khazaanchi has the following bundles of rupee cash notes with him: Rs. 1, 2, 5, 10, 50, 100, 500, 1000 A customer comes at his counter with various items that he has shopped. Mr. Khazaanchi totals the item prices and tells the customer his total amount payable. The customer gives Mr. Khazanchi some amount of cash. Find the total number of rupee notes of each denomination (i.e. 1, 2, 5, 10, 50, 100, 500, 1000) Mr. Khazaanchi will have to give to the withdrawer ensuring that the total number of rupee notes are minimum.
Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)