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

Stop Chasing People Who Don't Match Your Effort ❤️ | A Life Lesson

Right. [clears throat] So yeah, it's 12 a.m. in the night and I have been done with my work uh from everything and I wanted to share an ...