take a integer input and print the absolute value of that integer.

PHOTO EMBED

Mon Apr 22 2024 19:21:37 GMT+0000 (Coordinated Universal Time)

Saved by @Amlan #c

#include <stdio.h>

int main() {
    
    int a;
    
    printf("Enter The Value Of Integer : ");
    scanf("%d",&a);
    
    int b; 
    b = a*(-1);
    
    if(a>0){
        printf("\n %d Is The Absolute Value Of That Integer.",a);
    }
    if(a<0){
        printf("\n %d Is The Absolute Value Of That Integer.",b);
    }
    return 0;
}
content_copyCOPY