luc013.c (360B)
1 /* Write a program to find the absolute value 2 of a number entered through the keyboard. */ 3 /* Let Us C, Chap- 3, Page - 53, Qn No.: f(d) */ 4 5 #include <stdio.h> 6 #include <math.h> 7 int main() 8 { 9 double num; 10 printf("Enter the number : "); 11 scanf("%lf", &num); 12 num = abs(num); 13 printf("\nAbsolute value of the input is : %g", num); 14 return 0; 15 }