Question
Pattern Print DXC Automata Fix Questions AMCAT
void patternPrint(int num)
{
int print=1,i,j;
for(i=0;i<num;i++)
{
for(j=0;j<=i;j++);
{
printf("%d", print);
}
printf("\n");
}
}
-------------------------------------------
solution:
void patternPrint(int num)
{
int print=1,i,j;
for(i=0;i<num;i++)
{
for(j=0;j<=i;j++)
{
printf("%d", print);
}
printf("\n");
}
}