Saturday, August 27, 2016

uri- 1145 - Logical Sequence 2

#include<stdio.h>

int main()
{
int a,b,c=1,d,e=1;
scanf("%d %d",&b,&d);
for(a=1;a<=d;a++){
    printf("%d",a);
    if(a%b==0)printf("\n");
    else printf(" ");
  
}
return 0;
}

Runtime : 0.028

No comments: