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

JAC Board Computer || IIT 2025 || Introductory Information Technology || Class 10 || Practical Examination 2025

Marks Division HOE 30 Marks IT Application Report File 20 Marks Viva - Voce 10 Marks 1) Write an HTML code to generate a web p...