How many positive integers less than 1000 are congruent to 6 (mod 11)?
We can use modular arithmetic to solve this problem. The integers that are congruent to 6 (mod 11) are of the form 6 + 11k, where k is an integer. The smallest such integer is 6, and the largest such integer less than 1000 is 956. Therefore, there are 86 integers less than 1000 that are congruent to 6 (mod 11).
a=1;i=0; c=a % 11; if(c==6, goto4, goto6);i=i+1;printa; a++;if(a<1000, goto2, 0);print i
There are 91 such positive integers as follows:
6 , 17 , 28 , 39 , 50 , 61 , 72 , 83 , 94 , 105 , 116 , 127 , 138 , 149 , 160 , 171 , 182 , 193 , 204 , 215 , 226 , 237 , 248 , 259 , 270 , 281 , 292 , 303 , 314 , 325 , 336 , 347 , 358 , 369 , 380 , 391 , 402 , 413 , 424 , 435 , 446 , 457 , 468 , 479 , 490 , 501 , 512 , 523 , 534 , 545 , 556 , 567 , 578 , 589 , 600 , 611 , 622 , 633 , 644 , 655 , 666 , 677 , 688 , 699 , 710 , 721 , 732 , 743 , 754 , 765 , 776 , 787 , 798 , 809 , 820 , 831 , 842 , 853 , 864 , 875 , 886 , 897 , 908 , 919 , 930 , 941 , 952 , 963 , 974 , 985 , 996>> Total = 91 such integers