Skip to content

Instantly share code, notes, and snippets.

@sivaprabug
Created November 15, 2017 06:26
Show Gist options
  • Save sivaprabug/68873330653a4c759c372e8053b53ba3 to your computer and use it in GitHub Desktop.
Save sivaprabug/68873330653a4c759c372e8053b53ba3 to your computer and use it in GitHub Desktop.
#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