#include<iostream>
using namespace std;
int main(){
int num,sqr,cub;
cout<<"Enter a number: ";
cin>>num;
sqr=num*num;
cub=num*num*num;
if(num>0 && num<=10)
{
cout<<"Display cube: "<<cub;
}
else{
cout<<"Display Square: "<<sqr;
}
}
Comments
Leave a comment