Wednesday, November 26, 2014

printf -n to n

print -n to n

 

 

 

//print -n to n
#include<stdio.h>
int main()
{
    int n,m;
    scanf("%d",&n);
    m=n*-1;
    while(m<=n){
        printf("%d\t",m);
        m++;
    }
    printf("\n");
    return 0;
}
 

No comments:

Post a Comment