0
May i have code in C to get above pattern as my output if i give 4 as input(number of lines)?
1 333 55555 7777777
5 ответов
+ 2
#include <stdio.h>
int main()
{
int n,i,j,a=1;
scanf("%d",&n);
for(i=1;i<=n;i++) {
for(j=1;j<=a;j++) {
printf("%d",a);
}
printf("\n");
a +=2;
}
return 0;
}
here you go :)
+ 2
thankyou i got it 👌
+ 2
i'll try,btw thanks for this question
+ 1
what does 4 as input(number of line means)? can u explain?
+ 1
@abhishek_if i give input 2 i should get
1
333
for i/p 3,
o/p can be
1
333
55555
which indicates it has to print upto 3rd odd number.
code which is independent of input is also ok for me.but i have to get above pattern as output.