Program to find the absolute value of given integer using
Conditional Operators
Answer Posted / bushahiro emmy
#include<stdio.h>
#include<math.h>
int main()
{
int X;
printf("Entrez un nombre: ");
scanf("%d",&X);
printf("la valeur absolue de %d est %.2lf.\n",X,fabs
(X));
return 0;
}
| Is This Answer Correct ? | 7 Yes | 9 No |
Post New Answer View All Answers
Difference between exit() and _exit() function?
Can an array be an Ivalue?
What is malloc and calloc?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
What's the right way to use errno?
How many types of arrays are there in c?
What do you know about the use of bit field?
What is scope rule in c?
What is the most efficient way to count the number of bits which are set in an integer?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
Explain which function in c can be used to append a string to another string?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
When is a void pointer used?
What is a static variable in c?
How can I read in an object file and jump to locations in it?