A community for students.
Here's the question you clicked on:
 0 viewing
Yahoo!
 3 years ago
write a c++ prgm to find the cube of given number
Yahoo!
 3 years ago
write a c++ prgm to find the cube of given number

This Question is Closed

A.Avinash_Goutham
 3 years ago
Best ResponseYou've already chosen the best response.2#include<iostream.h> #include<conio.h> void main() { clrscr(); //to clear screen float cube(float); //function prototype float a,cu; cout<<"Enter any number:"; cin>>a; cu=cube(a); //function calling cout<<"\nCube of "<<a<<" is "<<cu; getch(); } float cube(float a) { float cu; cu=a*a*a; return(cu); } sry i donno c++ so jus copied the code .

Yahoo!
 3 years ago
Best ResponseYou've already chosen the best response.0oh...i want this in simple language

mathslover
 3 years ago
Best ResponseYou've already chosen the best response.0@A.Avinash_Goutham Please provide the link also .. _

A.Avinash_Goutham
 3 years ago
Best ResponseYou've already chosen the best response.2. printf("enter the number:"); scanf("%f",&x); x=x*x*x; printf("the cube of number %f",x);

A.Avinash_Goutham
 3 years ago
Best ResponseYou've already chosen the best response.2replace %f with %d nd float with int

nick67
 3 years ago
Best ResponseYou've already chosen the best response.3#include <iostream> using namespace std; int main() { int value, cube; cin >> value; cube = value*value*value; cout << cube; return 0; }

Yahoo!
 3 years ago
Best ResponseYou've already chosen the best response.0help me to do this in simple manner

Yahoo!
 3 years ago
Best ResponseYou've already chosen the best response.0@nick67 can u write by giving the values

Yahoo!
 3 years ago
Best ResponseYou've already chosen the best response.0cube = value*value*value; give some value

nick67
 3 years ago
Best ResponseYou've already chosen the best response.3value is entered with "cin >> value" from the user

nick67
 3 years ago
Best ResponseYou've already chosen the best response.3At the end of a function (in this case the "main" function) you use a return to exit the function; in this case the value is returned to the program caller, i.e. the O.S. Usually a program without errors returns 0

Yahoo!
 3 years ago
Best ResponseYou've already chosen the best response.0@nick67 do u have c++ V 3.5

Yahoo!
 3 years ago
Best ResponseYou've already chosen the best response.0Can u send me that or plzz provide a link to download it ..)))

nick67
 3 years ago
Best ResponseYou've already chosen the best response.3I use Eclipse with C++ on Linux

Yahoo!
 3 years ago
Best ResponseYou've already chosen the best response.0u have LINUX.................oh....no i am on WiNDOWS 7

nick67
 3 years ago
Best ResponseYou've already chosen the best response.3try this: http://www.bloodshed.net/devcpp.html it's a bit old but works

nick67
 3 years ago
Best ResponseYou've already chosen the best response.3for students I strongly suggest to switch to GCC compiler as soon as possible

Yahoo!
 3 years ago
Best ResponseYou've already chosen the best response.0is this same as Borland C++

nick67
 3 years ago
Best ResponseYou've already chosen the best response.3I don't know, because I don't use Borland anymore, but give a chance to the GNU/Linux world :)

nick67
 3 years ago
Best ResponseYou've already chosen the best response.3and as IDE take into consideration Eclipse framework; it's very flexible and let you to do many things http://www.eclipse.org
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.