Monday, October 19, 2020

Display the given number if it is negative using if statement in c

 #include <stdio.h>

int main()

{

    int n;

    printf("Enter a number:");

    scanf("%d", &n);

    if(n<0)

    {

        printf("%d is negative", n);

    }

    return 0;

}

No comments:

Post a Comment

Learning Emotional Balance ❤️ | Finding Peace Through Gratitude

  https://youtube.com/shorts/YDtMx32v3jw Hi. So, um just want to share one thing that uh I'm learning to become neutral because um be te...