Answers for "c math absolute value"

C
0

c absolute value

#include <stdio.h>
#include <stdlib.h>

int main() 
{
	int a;
	printf("ABSOLUTE VALUEnnNumer: ");
	scanf("%d",&a);
    
	if(a < 0)
	{
		a = a * (-1);
	}
    
	printf("Absolute value: %dnn", a);
    
	system("pause");
}
Posted by: Guest on February-11-2021

Code answers related to "C"

Browse Popular Code Answers by Language