Monday, August 23, 2021

print square and cube

 6.program to accept a number from user and print its square and cube. 

#include<stdio.h>

#include<conio.h>


void main()

{

  int n,sqre,cube;

  clrscr();


  printf("Enter Number: ");

  scanf("%d",&n);


  sqre=n*n;

  cube=n*n*n;


  printf("\nSquare: %d\nCube: %d",sqre,cube);


  getch();

1 Comments:

At August 24, 2021 at 6:54 PM , Blogger Unknown said...

Kkk

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home