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

Programmingway@Eklavya Technosys!: Computer Solutions || Class-4 || Computer for Scho...

Programmingway@Eklavya Technosys!: Computer Solutions || Class-4 || Computer for Scho... :  1) Choose correct one :- 1) The step by step pla...