generated from justuser-31/code_projects_template
sync
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user