1 11 111 1111 write a programm in c
In Python, the code is pretty easy and a single line one on Jupyter Platform.
As far as C is concerned, the algorithm goes somewhat like this. You need a Do While Loop
With the Function
k=0;
do
{
z=10*k+1
k=z
print z
}
while (z<=1111)
I guess this will work. Of course you may use While Loop or For Loop Instead. I believe use the appropriate Print function with /d for printing in different line.