Skip to content

luc013.c

Problem Statement

Write a program to find the absolute value of a number entered through the keyboard.

Metadata

Property Detail
Author Amit Dutta (amitdutta4255@gmail.com)
License MIT

Actions

Raw View on GitHub

💡 You can print or save this file by opening Raw and using your browser.

Source Code

#include <stdio.h>
#include <math.h>
int main()
{
    double num;
    printf("Enter the number : ");
    scanf("%lf", &num);
    num = abs(num);
    printf("\nAbsolute value of the input is : %g", num);
    return 0;
}