#include<stdio.h>int main(){int i;for(i=7;i<=1000;i+=7)if(i%27==1 || i%31==3)printf("%d \n",i);return 0;}
Standard input is empty
28 189 217 406 595 623 784 840 973
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!