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

POV: Childhood Memories of Diwali & Gujarati New Year ❤️

  https://www.youtube.com/watch?v=QJKdeGmDXdI Hi. So, a very happy Diwali to everyone out there. And like tomorrow it's going to be a Gu...