write program Input any number, if number is positive print its square and cube.
Answers
Answered by
4
Answer:
C Program To Calculate Square And Cube Of Given Number
Write a c program to find out the square and cube of any given number?
This c program will calculate the square and cube of any given number. We will also perform this by the use of functions.
C Program To Find Square and Cube Of A Number
#include<stdio.h>
#include<conio.h>
void main()
{
int a,s,c;
clrscr();
printf("\n Enter A Number: ");
scanf("%d",&a);
s=a*a; //Square = number * number
c=s*a; //Cube = Square * number
printf("\n Square of %d is = %d",a,s);
printf("\n\n Cube of %d is = %d",a,c);
getch();
plz thank me
Similar questions