Write a C program to find (x+b)^2 output.
#include <stdio.h>
int main()
{
float x,b,result;
printf("Enter x and b: ");
scanf("%f %f", &x, &b);
result= (x+b)*(x+b);
printf("(%.2f + %.2f)^2 = %.2f\n", x,b,result);
getchar();
getchar();
return 0;
}
Comments
Leave a comment