generated from justuser-31/code_projects_template
27 lines
436 B
C
27 lines
436 B
C
#include <stdio.h>
|
|
#include <math.h>
|
|
|
|
int main() {
|
|
float x, y;
|
|
printf("Enter x: "); scanf("%f", &x);
|
|
printf("Enter y: "); scanf("%f", &y);
|
|
|
|
float sum = x + y;
|
|
float sub = x - y;
|
|
float mult = x * y;
|
|
float div = x / y;
|
|
float poww = pow(x, y);
|
|
float sqrtt = pow(x, (1/y));
|
|
|
|
printf("Results:\n"
|
|
"sum: %f\n"
|
|
"sub: %f\n"
|
|
"mult: %f\n"
|
|
"div: %f\n"
|
|
"pow: %f\n"
|
|
"sqrt: %f\n",
|
|
sum, sub, mult, div, poww, sqrtt);
|
|
|
|
return 0;
|
|
}
|