Thursday, June 23, 2016

SOLUTION OF URI 1145


//  1145   (Mahmud_Jamil) BRUR
//  Logical Sequence 2






#include <stdio.h>
int main()
{
    int X,Y,z,a,b=0;
    scanf("%d%d", &X,&Y);
    for(a=1; a<=Y; a++)
    {
        b++;
        if(b==X) printf("%d",a);
        else printf("%d ", a);
        if(b==X)
        {
            b=0;
            printf("\n");
        }
    }
    return 0;
}




0 comments:

Post a Comment