answersLogoWhite

0


Best Answer

for (int row=0; row<4; ++row) {

int i = 1;

for (int col=0; col<=row; ++col) {

printf ("%d", i);

i=(i==1?0:1);

}

}

User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the C program to print the following triangle 1 10 101 1010?
Write your answer...
Submit
Still have questions?
magnify glass
imp