Computer Science, asked by ammumanickam, 4 months ago

Write a program to accept a number and print its square ​

Answers

Answered by santanumandal861
1

Answer:

009. Write a program to accept a number from user and print it's square & cube in C language

main()

{

int n, Square, Cube;

clrscr();

printf("Enter Number: ");

scanf("%d",&n);

Square=n*n;

Cube=n*n*n;

Answered by Anonymous
1

Answer:

include<stdio.h>

#include<conio.h>

main()

{

int n, Square, Cube;

clrscr();

printf("Enter Number: ");

scanf("%d",&n);

Square=n*n;

Cube=n*n*n;

printf("\nSquare: %d\nCube: %d",Square,Cube);

getch();

}

Similar questions