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

Struggling to Meditate? Try This Simple 1–100 Method (5 Minutes)

 Hi, so today we are going to discuss how to meditate easily in your daily life. Um, so it's like very simple but effective method that ...