Skip to content

Instantly share code, notes, and snippets.

@gsivaprabu gsivaprabu/range.c
Created Nov 15, 2017

Embed
What would you like to do?
#include <stdio.h>
void main() {
int i = 0, recid = i = 320;
int lastRecordId = 0;
printf(" enter last record id :");
scanf("%d", & lastRecordId);
printf("lastRecordId:%d", lastRecordId);
i = recid;
while (i > 0) {
if (i <= lastRecordId && i > (lastRecordId - 300))
printf("id:%d", i);
i--;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.