Write a program that inputs a number from the user and displays its square and cube.
Answers
Answered by
1
Explanation:
#include<iostream>
#include<conio.h>
#include<math.h>
using namespace std;
int main()
{
const float PI=3.14;
float area, circumference, radius;
cout<<"Input radius of spehere: ";
cin>>radius;
area = 4*PI*pow(radius,2);
circumference = (4/3)*PI*pow(radius,3);
cout<<"Area: "<<area<<endl;
cout<<"Circumference: "<<circumference<<endl;
return 0;
}
I hope it is correct
Answered by
0
Answer: program to solve square and cube of a no.
Explanation:
Def test():
num=int(input ("enter a no."))
Square=num**2
Cube=num**3
print("square of the no. is",
Square)
print("cube of the no. is",
Cube)
I hope it's helpful to you and correct
Thank you
Similar questions
Computer Science,
5 months ago
Social Sciences,
5 months ago
Chemistry,
5 months ago
English,
10 months ago
Math,
10 months ago
Math,
1 year ago
Science,
1 year ago