Created
August 10, 2017 17:23
-
-
Save echo-akash/eacec686bcc5ec54d4614c7363c6bd49 to your computer and use it in GitHub Desktop.
Print a series of numbers excluding the mentioned number.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int n,i,x; | |
printf("enter number range:"); | |
scanf("%d",&n);printf("number to be excluded:"); | |
scanf("%d",&x); | |
printf("numbers after exclusion:"); | |
for(i=1;i<=n;i++) | |
{ | |
if(i!=x) | |
printf("%d ",i); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment