answersLogoWhite

0


Best Answer

for (int i=0; i<3; ++i) printf ("1 1 0 ");

printf("1\n");

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a c program to print the pattern 1 1 0 1 1 0 1 1 0 1?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write c program to print?

include &lt;stdio.h&gt; int main (void) { puts ("print"); return 0; }


Write a program in cpp to print the charminar?

int main (void) { puts ("charminar"); return 0; }


How do you write a c program to print n no's required using while loop?

int i=0; while (i++&lt;n) { /*...*/ }


How do you write psudocode for a program that outputs every number from 0 through 8 along with it's square and cube?

for i = 0 to 8 { print i, i^2, i^3 }


Write a program to print 246810?

int main (void) { long int x = 246810 printf("%ld", x); return 0; }


How do you write a program to print 1-47-10..........-40?

#include&lt;stdio.h&gt; int main(void) { printf ("1-47-10..........-40\n"); return 0; }


Write a C program to print the pattern 1 2 3 4 6 7 8 9 11?

#include&lt;stdio.h&gt; int main (void) { int i, j, x; x = 0; for (j=0; j&lt;2; ++j) { ++x; for (i=0; i&lt;4; ++i) { printf ("%d ", x); ++x; } } printf ("%d\n", x); return 0; }


Write a c program to find the maximum of two numbers and print out with its position?

maxValue = function (array) {mxm = array[0];for (i=0; i&lt;array.length; i++) {if (array[i]&gt;mxm) {mxm = array[i];}}return mxm;}; i don't know


Write a Qbasic program to find the root of a quadratic equation using the formula if the result is less than 0 the program should print the root are immerginary and end the program?

(Uses Square Root Function) PRINT "Ax^2 + Bx + C = 0" INPUT "A = ", A INPUT "B = ", B INPUT "C = ", C D = B * B - 4 * A * C IF D &gt; 0 THEN DS = SQR(D) PRINT "REAL ROOTS:", (-B - D) / (2 * A), (-B + D) / (2 * A) ELSE IF D = 0 THEN PRINT "DUPLICATE ROOT:", (-B) / (2 * A) ELSE DS = SQR(-D) PRINT "COMPLEX CONJUGATE ROOTS:", (-B / (2 * A)); "+/-"; DS / (2 * A); "i" END IF END IF


Write a program in C to print 1 to10 as 1 2 3 4 5 6?

int main() { for(int i = 1; i


Can you Write a program in 'c' to print sun and moon?

#include int main (int argc, char *argv[]) {printf ("sun\n");printf ("moon\n");return 0;}


Write a program that uses a for statement to calculate and print the product of the odd integers from 1 to 15?

Code example:#include int main(void) { int iOddNum = 0; int iSum = 0; for(iOddNum = 1; iOddNum