Friday, October 23, 2020

Cube Root Solver in C++

 A simple program that I wrote that will ask the user to give a number and then the program will convert the given number into its cube root equivalent.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking and Arduino Project development at a very affordable price.


Program Listing

// Cube_Root_Solver.cpp
// Jake Rodriguez Pomperada, MAED-IT, MIT
// www.jakerpomperada.blogspot.com / www.jakerpomperada.com
// jakerpomperada@gmail.com
// Bacolod City, Negros Occidental Philippines

#include <iostream>
#include <math.h>

using namespace std;

int main()
{
    int num=0;
    double cube_root =0;

    cout <<"\n";
    cout <<"\tCube Root Solver in C++";
    cout <<"\n\n";
    cout <<"\tGive a Number : ";
    cin >> num;

    cube_root = pow(num,(float)1/3);

    cout <<"\n\n";
    cout << "\tThe Cube Root of " << num << " ] is "
         << cube_root << ".\n";
    cout <<"\n\n";
    cout <<"\tEnd of Program";
    cout <<"\n";
}



No comments:

Post a Comment