Program to input Square and Cube of an Integer | C++ Programming
Tuesday, August 11, 2020
C++ is a general-purpose programming language. It has imperative, object-oriented and generic programming features, while also providing facilities for low-level memory manipulation.
//Program to input Square and Cube of an Integer
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int i,s,c;
cout<<"\n Enter The Integer:";
cin>>i;
s=i*i;
c=i*i*i;
cout<<"\n Square="<<s;
cout<<"\n Cube="<<c;
getch();
}
//Program to input Square and Cube of an Integer
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int i,s,c;
cout<<"\n Enter The Integer:";
cin>>i;
s=i*i;
c=i*i*i;
cout<<"\n Square="<<s;
cout<<"\n Cube="<<c;
getch();
}
0 Comments