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;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s