Computer Science, asked by ajayewqqq, 5 months ago

Algorithm to find square &cube of given no.

Answers

Answered by ankuranshuman803
1

Answer:

#include<stdio.h>

#include<conio.h>

void main()

{

int a,s,c;

clrscr();

printf("\n Enter A Number: ");

scanf("%d",&a);

s=a*a;

c=s*a;

printf("\n Square of %d is = %d",a,s);

printf("\n\n Cube of %d is = %d",a,c);

getch();

}

Explanation:

square of number = number X number.

Cube of number= square X number.

Similar questions