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

Computer Network & Computer Features | Bal Varg | Computer Questions List!

  Computer Network & Computer Features 1) _______ is a thin strip like bar present at the bottom of the screen.   Taskbar 2) _______ ser...