Created
December 4, 2019 09:40
-
-
Save oykelrae/4df8729303f2eef584c6cc4a4a19d13c to your computer and use it in GitHub Desktop.
Модуль числа
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
int main() { | |
double x, result; | |
printf("Введите число: "); | |
scanf("%lf", &x); | |
result = fabs(x); | |
printf("Модуль вашего числа = %.1lf\n", result); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Введите число: -34 | |
Модуль вашего числа = 34.0 | |
Program ended with exit code: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment