In: Computer Science
write a c++ program using micro soft visual studio 2010 to write a program and store 36 in variable x and 8 in variable y. add them and store the result in the variable sum. then display the sum on screen with descriptive text. calculate the square root of integer 36 in x. store the result in a variable. calculate the cube root of integer 8 in y. store result in a variable. display the results of square root and cube root on the screen.
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int x=36;
int y=8;
int sum = x+y;
cout<<"Sum = "<<sum<<endl;
double squareRoot = sqrt(x);
double cubeRoot = cbrt(y);
cout<<"Square root: "<<squareRoot<<endl;
cout<<"Cube root: "<<cubeRoot<<endl;
}
NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.
I AM HERE TO HELP YOUIF YOU LIKE MY ANSWER PLEASE RATE AND HELP ME IT IS VERY IMP FOR ME