Tag Archives: Cube

Write a function to find squre and cube of a num


#include<stdio.h>
void squrecube(float x,float *s,float *c);
void main()
{

float x,s,c;
printf(“Enter the num:”);
scanf(“%f”,&x);
squrecube(x,&s,&c);
printf(“squre=%0.2f cube=%0.2f”,s,c);
return 0;
}
void squrecube(float x,float *s,float *c)
{
*s=x*x;
*c=x*x*x;
}

Advertisements