Thursday, July 29, 2021

C++ Program to find Square and Cube

C++ Program to find Square and Cube

#include<iostream.h>

#include<conio.h>

void main()

{

 int n,s,c;

 clrscr();

 cout<<"\nEnter Number : ";

 cin>>n;

    s=n*n;

 c=n*n*n;

 cout<<"\nNumber = "<<n;

 cout<<"\nSquare = "<<s;

 cout<<"\nCube = "<<c;

 getch();

}

 

   

No comments:

Post a Comment

12th January Swami Vivekanand Jayanti: National Youth Days

The day serves as a reminder to the youth of India to remain steadfast in their goals and contribute positively to society. Swami Vivekanand...