Sunday, October 25, 2020

C program to display the negative of the given positive number and vice-versa

 #include <stdio.h>

int main() {

    int n;

    printf("Enter a number:");

    scanf("%d",&n);

    n=-n;

    printf("Number=%d",n);

}

No comments:

Post a Comment

The Hardest Part of Content Creation Isn’t Editing. It’s Showing Up.

I totally understand and could relate. I still remember that time when I was posting nice posts regularly for few months and then posted my ...